Delete Armour

Discussion in 'Plugin Development' started by thatdubstepgamer, Aug 16, 2013.

Thread Status:
Not open for further replies.
  1. How do you delete armour when you have it on. I know i have player.getInventory().clear(); But how do I get it to clear armour.
     
  2. Offline

    artish1

    you use
    Code:
    player.getInventory().setArmorContents(null);
     
  3. I tried that but did not work :'(
     
  4. Offline

    artish1

    If it did not work then try this:
    Code:
    ItemStack air = new ItemStack(Material.AIR);
    player.getInventory().setHelmet(air);
    player.getInventory().setChestplate(air);
    player.getInventory().setBoots(air);
    player.getInventory().setLeggings(air);
    player.updateInventory();
     
    Afridge1O1 likes this.
Thread Status:
Not open for further replies.

Share This Page