Dependency enchantment registering now use the api.

This commit is contained in:
alexcrea 2024-07-09 21:21:10 +02:00
parent 6f1e53f68e
commit 365d0ea847
No known key found for this signature in database
GPG key ID: 43FD265DB0DBF91F
6 changed files with 25 additions and 33 deletions

View file

@ -5,7 +5,6 @@ import org.bukkit.NamespacedKey;
import org.bukkit.enchantments.Enchantment;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import xyz.alexcrea.cuanvil.dependency.DependencyManager;
import xyz.alexcrea.cuanvil.enchant.wrapped.CAVanillaEnchantment;
import java.util.*;
@ -38,13 +37,6 @@ public class CAEnchantmentRegistry {
register(new CAVanillaEnchantment(enchantment));
}
if(DependencyManager.INSTANCE.getEnchantmentSquaredCompatibility() != null){
DependencyManager.INSTANCE.getEnchantmentSquaredCompatibility().registerEnchantments();
}
if(DependencyManager.INSTANCE.getEcoEnchantCompatibility() != null){
DependencyManager.INSTANCE.getEcoEnchantCompatibility().registerEnchantments();
}
}
/**

View file

@ -36,7 +36,7 @@ public class EnchantConflictGui extends MappedGuiListConfigGui<EnchantConflictGr
new IncludeGroup("new_group"),
0);
ConfigHolder.CONFLICT_HOLDER.getConflictManager().getConflictList().add(conflict);
ConfigHolder.CONFLICT_HOLDER.getConflictManager().addConflict(conflict);
// save empty conflict in config
String[] emptyStringArray = new String[0];