Check if the entity exists before attempting to get the entity when sending item packet

This commit is contained in:
Andrew 2013-09-06 17:39:27 +12:00
parent 90acf3e5c3
commit 2df5aee8fe

View File

@ -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;