From 5fe3f036229727bca9c71a31b68a120524bc6b78 Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 6 Sep 2013 17:41:17 +1200 Subject: [PATCH] Don't send the packets if you are not the correct disguise!! --- src/me/libraryaddict/disguise/DisguiseTypes/FlagWatcher.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/FlagWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/FlagWatcher.java index 6cbae240..b1e8afc3 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/FlagWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/FlagWatcher.java @@ -163,7 +163,7 @@ public class FlagWatcher { } protected void sendData(int data) { - if (disguise.getWatcher() == null || disguise.getEntity() == null || !DisguiseAPI.isDisguised(disguise.getEntity())) + if (disguise.getWatcher() == null || DisguiseAPI.getDisguise(disguise.getEntity()) != disguise) return; Entity entity = disguise.getEntity(); Object value = entityValues.get(data); @@ -234,7 +234,7 @@ public class FlagWatcher { if (itemStack != null && itemStack.getTypeId() != 0) itemToSend = CraftItemStack.asNMSCopy(itemStack); items[slot] = itemStack; - if (disguise.getEntity() == null) + if (DisguiseAPI.getDisguise(disguise.getEntity()) != disguise) return; slot++; if (slot > 4)