Solved Clearing an inventory

Discussion in 'Spigot Plugin Development' started by Wilsoon, Jan 27, 2020.

Thread Status:
Not open for further replies.
  1. I want to clear an inventory of a player, I tried player.getInventory().setContents(MaterialType.AIR) and it said ItemStack[] is not applicable for org.bukkit.Material.

    How do I do it so I can clear the inventory (Including Armor, and everything)?
     
  2. Can't you just do Material.AIR ?

    Why MaterialType?
     
  3. Strahan

    Benefactor

    getInventory() has a method clear() :)
     
    • Useful Useful x 1
  4. Welp, thank you. I'm an idiot.
     
Thread Status:
Not open for further replies.