I am making a plugin where if the person has the custom item in there inventory then they will respawn with there stuff when they die. I have been successful in making the actual items but I cant figure out how to make it so that it detects if the person has it in there inventory. Any help would be greatly appreciated. If talking over skype helps then contact me: mrclonehero
4
This is what mine looks like
public void onDeath(PlayerDeathEvent e) {
Item phoenixDown = new Item()
if player.getInventory().contains(phoenixDown) {
}So you have a custom Item?
Item customItem = new Item();
if(player.getItemInHand().contains(item){
}
