EntityArmoreChangeEvent problem??

Discussion in 'Plugin Development' started by TDS200, Apr 14, 2017.

  1. TDS200

    TDS200 New Member

    Joined:
    Feb 7, 2017
    Messages:
    17
    Likes Received:
    1
    I need to prevent the player from removing or changing their armor. I tried this code but you can still remove your armor or change it. My tests have revealed that is being called some of the times but even then it does not cancel the event.

    Code:
        @EventHandler
        public void armorChangeEvent(EntityArmorChangeEvent event){
            event.setCancelled(true);
        }
     
  2. CreeperFace

    CreeperFace Member

    Joined:
    Jan 16, 2016
    Messages:
    91
    Likes Received:
    15
    probably nukkit bug?