mirror of
https://github.com/TotalFreedomMC/TF-LibsDisguises.git
synced 2025-02-14 04:38:11 +00:00
Two simple checks for self disguises
This commit is contained in:
parent
01023a29ed
commit
c093a4c734
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue