Changes to Item Binding
Allows event to cancel the binding (rather than set key to "" which had the same effect but was messy) Prevents binding by Fake Players
This commit is contained in:
parent
aa33b6b8ff
commit
976599afe0
50 changed files with 152 additions and 268 deletions
|
@ -51,10 +51,9 @@ public class CheatyItem extends Item implements IBindable
|
|||
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
{
|
||||
EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer);
|
||||
World world = par3EntityPlayer.worldObj;
|
||||
|
||||
if (par3EntityPlayer instanceof FakePlayer)
|
||||
if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer instanceof FakePlayer)
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue