1

Needing plugin help

Sakleysi •11/28/14 2:41 pm
•
396
•
11/28/2014 3:55 pm
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
Posted by
Sakleysi
Level 29 : Expert Architect
13

  Have something to say?

Join • Sign in

4

Sakleysi
• 11/28/2014 3:55 pm
• Level 29 : Expert Architect
This is what mine looks like
public void onDeath(PlayerDeathEvent e) {
Item phoenixDown = new Item()
if player.getInventory().contains(phoenixDown) {

}
1
elfin8er
• 11/28/2014 3:50 pm
• Level 17 : Journeyman Crafter
So you have a custom Item?

Item customItem = new Item();
if(player.getItemInHand().contains(item){

}
1
Phush
• 11/28/2014 3:22 pm
• Level 41 : Master Mlem Mlem Bat
player.getInventory().contains()
or
player.getItemInHand().equals()
1
Sakleysi
• 11/28/2014 3:36 pm
• Level 29 : Expert Architect
With the custom items that i have what would i put in the contains() parentheses
(sorry, i am new at plugins)
1

Welcome