Test For Armor

Discussion in 'Spigot Plugin Development' started by DireLegendDev, Jun 10, 2015.

  1. What is the best event to test for a player's armor and give potion effects ONLY while they have it on? PlayerMoveEvent is terrible because it is called constantly. Any ideas/suggestions?

    • Creative Creative x 1
  2. PlayerMoveEvent has such a bad name, but it isn't really that bad. However, if you want constantly checking things, always use the scheduler. InventoryClickEvent should be sufficient.
    • Agree Agree x 2
  3. you can set the potioneffect unlimited and remove it if the player removes his armor (check at clickevent if he's wearing the armor)
    • Agree Agree x 1
  4. You would need some else#if statements...
    If the player has chestplate. But nothing else? Tell them they need the other armour. I think you can also use && or || for this.
  5. you can check for every armorslot... and yes he also can use elseif statments and he could also use && and || but he can use it in every if statement
    • Like Like x 1