Unlimited Durability

Discussion in 'Plugin Development' started by xAl3xTh3K1nG, Jul 7, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    xAl3xTh3K1nG

    Hello, so i'm working on a plugin where i want all players that's in an arraylist to not loss durability on swords, pickaxes, armors, bows, etc. How would i do this? Please give me some example code. :)
     
  2. Offline

    valon750

    xAl3xTh3K1nG

    Here's what I'll do, I'll explain what you need to do, then see if you can convert in to code.
    (Note this all relies on my ability to explain ;D)

    You'll want an EntityDamageByEntityEvent, which checks if a String ArrayList contains the players name, if it does, set the durability of the item in the players hand (player.getItemInHand()), then set the durability to 0. (setDurability())
     
  3. Offline

    DaanHai

  4. Offline

    xAl3xTh3K1nG

    ill try ty
     
Thread Status:
Not open for further replies.

Share This Page