I have a semi-custom enchantment plugin on my server. It just allows enchantments to be placed on armor. But for some reason, when I equip a chestplate with the health enchantment, it does not give me extra hearts. Code (Text): public class Health extends CustomEnchantment { static final Material[] SPEED_ITEMS = new Material[] { Material.LEATHER_CHESTPLATE, Material.IRON_CHESTPLATE, Material.CHAINMAIL_CHESTPLATE, Material.GOLD_CHESTPLATE, Material.DIAMOND_CHESTPLATE }; public Health() { super("Health", SPEED_ITEMS, 2); this.max = 2; this.isTableEnabled = false; } @Override public void applyEquipEffect(Player player, int enchantLevel) { player.setMaxHealth(26); } @Override public void applyUnequipEffect(Player player, int enchantLevel) { player.setMaxHealth(20); } } I am using EnchantmentAPI
Unfortunately, at the moment EnchantmentAPI's applyEquipEffect and applyUnequipEffect doesn't work, and will hopefully be fixed in an upcoming version.