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)
|
||||
itemToSend = CraftItemStack.asNMSCopy(itemStack);
|
||||
items[slot] = itemStack;
|
||||
if (disguise.getEntity() == null)
|
||||
return;
|
||||
slot++;
|
||||
if (slot > 4)
|
||||
slot = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user