mirror of
https://github.com/nulli0n/ExcellentEnchants-spigot.git
synced 2025-02-10 00:11:28 +01:00
v3.4.4 Engine API Update
This commit is contained in:
parent
82fb6dbb3b
commit
74c0ce9666
@ -82,7 +82,7 @@ public class EnchantDivineTouch extends ExcellentEnchant implements Chanced, Blo
|
|||||||
public ItemStack getSpawner(@NotNull CreatureSpawner spawnerBlock) {
|
public ItemStack getSpawner(@NotNull CreatureSpawner spawnerBlock) {
|
||||||
ItemStack itemSpawner = new ItemStack(Material.SPAWNER);
|
ItemStack itemSpawner = new ItemStack(Material.SPAWNER);
|
||||||
BlockStateMeta stateItem = (BlockStateMeta) itemSpawner.getItemMeta();
|
BlockStateMeta stateItem = (BlockStateMeta) itemSpawner.getItemMeta();
|
||||||
if (stateItem == null) return itemSpawner;
|
if (stateItem == null || spawnerBlock.getSpawnedType() == null) return itemSpawner;
|
||||||
|
|
||||||
CreatureSpawner spawnerItem = (CreatureSpawner) stateItem.getBlockState();
|
CreatureSpawner spawnerItem = (CreatureSpawner) stateItem.getBlockState();
|
||||||
spawnerItem.setSpawnedType(spawnerBlock.getSpawnedType());
|
spawnerItem.setSpawnedType(spawnerBlock.getSpawnedType());
|
||||||
|
@ -78,12 +78,6 @@ public class EnchantmentsListMenu extends ConfigMenu<ExcellentEnchants> implemen
|
|||||||
return this.enchantSlots;
|
return this.enchantSlots;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@NotNull
|
|
||||||
public Comparator<ExcellentEnchant> getObjectSorter() {
|
|
||||||
return (o1, o2) -> 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public List<ExcellentEnchant> getObjects(@NotNull Player player) {
|
public List<ExcellentEnchant> getObjects(@NotNull Player player) {
|
||||||
|
@ -42,7 +42,7 @@ public enum FitItemType {
|
|||||||
case LEGGINGS -> ItemUtil.isLeggings(item);
|
case LEGGINGS -> ItemUtil.isLeggings(item);
|
||||||
case BOOTS -> ItemUtil.isBoots(item);
|
case BOOTS -> ItemUtil.isBoots(item);
|
||||||
case ELYTRA -> item.getType() == Material.ELYTRA;
|
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 TOOL -> ItemUtil.isTool(item);
|
||||||
case ARMOR -> ItemUtil.isArmor(item);
|
case ARMOR -> ItemUtil.isArmor(item);
|
||||||
case SWORD -> ItemUtil.isSword(item) || (Config.ENCHANTMENTS_ITEM_SWORD_ENCHANTS_TO_AXES.get() && AXE.isIncluded(item));
|
case SWORD -> ItemUtil.isSword(item) || (Config.ENCHANTMENTS_ITEM_SWORD_ENCHANTS_TO_AXES.get() && AXE.isIncluded(item));
|
||||||
|
@ -28,11 +28,6 @@ public class TierManager extends AbstractManager<ExcellentEnchants> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onLoad() {
|
protected void onLoad() {
|
||||||
/*if (ExcellentEnchants.isLoaded) {
|
|
||||||
this.getTiers().forEach(tier -> tier.getEnchants().clear());
|
|
||||||
return;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
this.config = JYML.loadOrExtract(plugin, FILE_NAME);
|
this.config = JYML.loadOrExtract(plugin, FILE_NAME);
|
||||||
|
|
||||||
for (String sId : config.getSection("")) {
|
for (String sId : config.getSection("")) {
|
||||||
|
@ -4,6 +4,6 @@ name: ExcellentEnchants
|
|||||||
author: NightExpress
|
author: NightExpress
|
||||||
desciption: Vanilla-like enchants for your server.
|
desciption: Vanilla-like enchants for your server.
|
||||||
depend: [ NexEngine ]
|
depend: [ NexEngine ]
|
||||||
softdepend: [ ProtocolLib, NoCheatPlus, PlaceholderAPI ]
|
softdepend: [ ProtocolLib, NoCheatPlus, PlaceholderAPI, MythicMobs ]
|
||||||
api-version: 1.17
|
api-version: 1.17
|
||||||
load: STARTUP
|
load: STARTUP
|
Loading…
Reference in New Issue
Block a user