Check if the entity exists before attempting to get the entity when sending item packet
This commit is contained in:
parent
90acf3e5c3
commit
2df5aee8fe
@ -234,6 +234,8 @@ public class FlagWatcher {
|
|||||||
if (itemStack != null && itemStack.getTypeId() != 0)
|
if (itemStack != null && itemStack.getTypeId() != 0)
|
||||||
itemToSend = CraftItemStack.asNMSCopy(itemStack);
|
itemToSend = CraftItemStack.asNMSCopy(itemStack);
|
||||||
items[slot] = itemStack;
|
items[slot] = itemStack;
|
||||||
|
if (disguise.getEntity() == null)
|
||||||
|
return;
|
||||||
slot++;
|
slot++;
|
||||||
if (slot > 4)
|
if (slot > 4)
|
||||||
slot = 0;
|
slot = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user