1. Guest, as per the stickied thread, this forum has not been in use since 2014. All bugs and feature requests should be posted to JIRA.

Bug Extra Hearts

Discussion in 'Bugs & Feature Requests' started by bmac20, May 27, 2016.

  1. For some reason, when I put this enchant on, it does not give me extra hearts in 1.9. However, when I went back to an older version of spigot, it gave me them....

    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);
        }
    }