Check if owner is set before syphoning

This commit is contained in:
Nick 2016-02-18 09:51:58 -08:00
parent 48622bf2e7
commit a35aced93a

View file

@ -60,6 +60,10 @@ public class ItemBindable extends Item implements IBindable
{ {
IBindable itemBindable = (IBindable) stack.getItem(); IBindable itemBindable = (IBindable) stack.getItem();
String owner = itemBindable.getOwnerUUID(stack); String owner = itemBindable.getOwnerUUID(stack);
if (Strings.isNullOrEmpty(owner))
return false;
SoulNetwork network = NetworkHelper.getSoulNetwork(owner); SoulNetwork network = NetworkHelper.getSoulNetwork(owner);
return NetworkHelper.syphonAndDamage(network, player, lpUsed); return NetworkHelper.syphonAndDamage(network, player, lpUsed);
} }