How to keep certain items on a players death and give them back to the player.

Discussion in 'Plugin Development' started by xManfro, Dec 30, 2014.

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

    xManfro

    How would you do this so a say a players pickaxe will be given back to them after they respawn.
     
  2. Offline

    MineStein

    Assign a HashMap with a player name and an ItemStack. Whenever the player dies, add the ItemStack you want to the HashMap. When they respawn, give them the item back. Have a list of ItemStacks if you want.
     
  3. Offline

    teej107

    Alternate method:
    Set the minecraft gamerule "keepInventory" to true. On death, just remove all the items except for the pickaxe.
     
Thread Status:
Not open for further replies.

Share This Page