item durability

Discussion in 'Spigot Plugin Development' started by TheFuzzyHead5, Apr 13, 2017.

  1. Is there a way that I can set custom durability for a pickaxe?

    I understand there's itemstack#setDurability(short) which is fine. But this doesn't affect anything, i want it so that I can set it to maybe 25 uses before it breaks. Possible?
     
  2. FrostedSnowman

    Resource Staff

    durability is different in this case.

    its basically whatever you input how much it'll subtract.

    so say for example that an iron helmet had 100/100 durability.

    if I do ironHelmet.setDurability(25);

    it'll set the durability to 100 - 25 = 75
     
    • Informative Informative x 1