v3.4.4 Engine API Update

This commit is contained in:
nulli0n 2023-06-16 15:56:33 +05:00
parent 82fb6dbb3b
commit 74c0ce9666
5 changed files with 3 additions and 14 deletions

View File

@ -82,7 +82,7 @@ public class EnchantDivineTouch extends ExcellentEnchant implements Chanced, Blo
public ItemStack getSpawner(@NotNull CreatureSpawner spawnerBlock) {
ItemStack itemSpawner = new ItemStack(Material.SPAWNER);
BlockStateMeta stateItem = (BlockStateMeta) itemSpawner.getItemMeta();
if (stateItem == null) return itemSpawner;
if (stateItem == null || spawnerBlock.getSpawnedType() == null) return itemSpawner;
CreatureSpawner spawnerItem = (CreatureSpawner) stateItem.getBlockState();
spawnerItem.setSpawnedType(spawnerBlock.getSpawnedType());

View File

@ -78,12 +78,6 @@ public class EnchantmentsListMenu extends ConfigMenu<ExcellentEnchants> implemen
return this.enchantSlots;
}
@Override
@NotNull
public Comparator<ExcellentEnchant> getObjectSorter() {
return (o1, o2) -> 0;
}
@Override
@NotNull
public List<ExcellentEnchant> getObjects(@NotNull Player player) {

View File

@ -42,7 +42,7 @@ public enum FitItemType {
case LEGGINGS -> ItemUtil.isLeggings(item);
case BOOTS -> ItemUtil.isBoots(item);
case ELYTRA -> item.getType() == Material.ELYTRA;
case WEAPON -> ItemUtil.isWeapon(item);
case WEAPON -> SWORD.isIncluded(item) || ItemUtil.isTrident(item);
case TOOL -> ItemUtil.isTool(item);
case ARMOR -> ItemUtil.isArmor(item);
case SWORD -> ItemUtil.isSword(item) || (Config.ENCHANTMENTS_ITEM_SWORD_ENCHANTS_TO_AXES.get() && AXE.isIncluded(item));

View File

@ -28,11 +28,6 @@ public class TierManager extends AbstractManager<ExcellentEnchants> {
@Override
protected void onLoad() {
/*if (ExcellentEnchants.isLoaded) {
this.getTiers().forEach(tier -> tier.getEnchants().clear());
return;
}*/
this.config = JYML.loadOrExtract(plugin, FILE_NAME);
for (String sId : config.getSection("")) {

View File

@ -4,6 +4,6 @@ name: ExcellentEnchants
author: NightExpress
desciption: Vanilla-like enchants for your server.
depend: [ NexEngine ]
softdepend: [ ProtocolLib, NoCheatPlus, PlaceholderAPI ]
softdepend: [ ProtocolLib, NoCheatPlus, PlaceholderAPI, MythicMobs ]
api-version: 1.17
load: STARTUP