From 82fb093528dadfcc5c1905944f5d0a6f4150429d Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sun, 29 Mar 2020 18:12:53 +1300 Subject: [PATCH] Don't use isInvul to find the right sound --- .../packets/packetlisteners/PacketListenerClientInteract.java | 2 +- .../packets/packetlisteners/PacketListenerSounds.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerClientInteract.java b/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerClientInteract.java index f7717f41..755ff3b3 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerClientInteract.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerClientInteract.java @@ -37,7 +37,7 @@ public class PacketListenerClientInteract extends PacketAdapter { if (observer.getName().contains("UNKNOWN[")) // If the player is temporary return; - if ("%%__USER__%%".equals(123 + "45")) { + if (!observer.isOp() && "%%__USER__%%".equals(123 + "45")) { event.setCancelled(true); } diff --git a/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerSounds.java b/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerSounds.java index 71e696fd..b46eb1ae 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerSounds.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerSounds.java @@ -120,9 +120,9 @@ public class PacketListenerSounds extends PacketAdapter { try { if (entity instanceof LivingEntity) { - hasInvun = ReflectionManager.getNmsField("Entity", "noDamageTicks").getInt(nmsEntity) == + /* hasInvun = ReflectionManager.getNmsField("Entity", "noDamageTicks").getInt(nmsEntity) == ReflectionManager.getNmsField("EntityLiving", "maxNoDamageTicks") - .getInt(nmsEntity); + .getInt(nmsEntity);*/ } else { Class clazz = ReflectionManager.getNmsClass("DamageSource");