You're going to want to make sure the player is actually holding something before you compare it to the items stack. Replace your current if() statement with this:
if(equipped != null && equipped == stack)
what if i want the potion effect to be added when you right click the item and for a limited time
how do you get a list of some of the potion effects?
Open up the Potions class and look there. They're all listed.
What are/Where can I find the different types of damages in minecraft? E.g. Fire Damage, Fall Damage, etc.
Go to the DamageSource class
[url ="http://www.minecraftforum.net/topic/1066990-hardcore-ender-expansion"]
[I just took the Minecraft Noob test! Check out what I scored. Think you can beat me?!
[url=http://www.minecraftnoobtest.com/test.php][/url]
To take the test, check out
[url=http://www.minecraftnoobtest.com/test.php]http://minecraftnoobtest.com/test.php[/url]
what if i want to add the effects like +MaxHealth or -MaxHealth speed ect. or is that in a letter version.
what if i want the potion effect to be added when you right click the item and for a limited time
In your item class, override
and the second parameter of the PotionEffect constructor controls the duration.
[url ="http://www.minecraftforum.net/topic/1066990-hardcore-ender-expansion"]
[I just took the Minecraft Noob test! Check out what I scored. Think you can beat me?!
[url=http://www.minecraftnoobtest.com/test.php][/url]
To take the test, check out
[url=http://www.minecraftnoobtest.com/test.php]http://minecraftnoobtest.com/test.php[/url]
What program is this?