Durability switch

Discussion in 'Plugin Development' started by noraver, Mar 31, 2013.

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

    noraver

    hello i was wondering if you could switch durability on a item like
    my plugin is making leather armor but i want it to have the durability of diamond armor
    i can make it so the leather armor registers having diamond durability and maybe armor points to?
     
  2. Offline

    Minnymin3

    try something like:
    public void durability(ItemStack i, short durability) {
    i.setDurability(durability);
    }

    Havent tested it so dont know if itl work.
     
  3. Offline

    ZeusAllMighty11

    Well I think durability starts at 0 (full durability, no bar) and ends at X depending on the item. The only way I could see you giving it the durability of diamond is to log changes made to it.

    For me, on my server, it would take way too long to do that so I just gave wooden swords durability X (10) I think, or something like that
     
Thread Status:
Not open for further replies.

Share This Page