From c093a4c734b1b9efdd29522c13888be3b407e64a Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sat, 21 Jun 2014 07:13:07 +1200 Subject: [PATCH] Two simple checks for self disguises --- .../libraryaddict/disguise/utilities/DisguiseUtilities.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/me/libraryaddict/disguise/utilities/DisguiseUtilities.java b/src/me/libraryaddict/disguise/utilities/DisguiseUtilities.java index d0abbf05..7fe19da6 100644 --- a/src/me/libraryaddict/disguise/utilities/DisguiseUtilities.java +++ b/src/me/libraryaddict/disguise/utilities/DisguiseUtilities.java @@ -207,7 +207,7 @@ public class DisguiseUtilities { destroyPacket.getIntegerArrays().write(0, new int[] { disguise.getEntity().getEntityId() }); for (Object p : cloned) { Player player = (Player) ReflectionManager.getBukkitEntity(p); - if (disguise.canSee(player.getName())) { + if (player == disguise.getEntity() || disguise.canSee(player.getName())) { ProtocolLibrary.getProtocolManager().sendServerPacket(player, destroyPacket); } } @@ -532,7 +532,7 @@ public class DisguiseUtilities { // if (entity instanceof Player && !((Player) ReflectionManager.getBukkitEntity(player)).canSee((Player) // entity)) // continue; - if (disguise.canSee(player.getName())) { + if (player == disguise.getEntity() || disguise.canSee(player.getName())) { clear.invoke(entityTrackerEntry, p); updatePlayer.invoke(entityTrackerEntry, p); }