Two simple checks for self disguises
This commit is contained in:
parent
01023a29ed
commit
c093a4c734
@ -207,7 +207,7 @@ public class DisguiseUtilities {
|
|||||||
destroyPacket.getIntegerArrays().write(0, new int[] { disguise.getEntity().getEntityId() });
|
destroyPacket.getIntegerArrays().write(0, new int[] { disguise.getEntity().getEntityId() });
|
||||||
for (Object p : cloned) {
|
for (Object p : cloned) {
|
||||||
Player player = (Player) ReflectionManager.getBukkitEntity(p);
|
Player player = (Player) ReflectionManager.getBukkitEntity(p);
|
||||||
if (disguise.canSee(player.getName())) {
|
if (player == disguise.getEntity() || disguise.canSee(player.getName())) {
|
||||||
ProtocolLibrary.getProtocolManager().sendServerPacket(player, destroyPacket);
|
ProtocolLibrary.getProtocolManager().sendServerPacket(player, destroyPacket);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -532,7 +532,7 @@ public class DisguiseUtilities {
|
|||||||
// if (entity instanceof Player && !((Player) ReflectionManager.getBukkitEntity(player)).canSee((Player)
|
// if (entity instanceof Player && !((Player) ReflectionManager.getBukkitEntity(player)).canSee((Player)
|
||||||
// entity))
|
// entity))
|
||||||
// continue;
|
// continue;
|
||||||
if (disguise.canSee(player.getName())) {
|
if (player == disguise.getEntity() || disguise.canSee(player.getName())) {
|
||||||
clear.invoke(entityTrackerEntry, p);
|
clear.invoke(entityTrackerEntry, p);
|
||||||
updatePlayer.invoke(entityTrackerEntry, p);
|
updatePlayer.invoke(entityTrackerEntry, p);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user