From 1c05d3d2cd20dff700d98e3ccc1c751a42fad8bd Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sun, 27 Feb 2022 01:26:01 +1300 Subject: [PATCH] Fix an error with sound group null, modified sound groups? --- .../packets/packetlisteners/PacketListenerSounds.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/plugin/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerSounds.java b/plugin/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerSounds.java index 3b6bbcef..086621a2 100644 --- a/plugin/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerSounds.java +++ b/plugin/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerSounds.java @@ -74,7 +74,7 @@ public class PacketListenerSounds extends PacketAdapter { disguisedEntity = entity; soundGroup = SoundGroup.getGroup(entity.getType().name()); - if (soundGroup.getSound(soundEffectObj) == null) { + if (soundGroup == null || soundGroup.getSound(soundEffectObj) == null) { return; } @@ -95,12 +95,6 @@ public class PacketListenerSounds extends PacketAdapter { return; } - // Blocks null and CANCEL, HURT and DEATH are 100% handled by entity status! - if (soundType != SoundType.STEP && soundType != SoundType.IDLE) { - //event.setCancelled(true); - // return; - } - if (disguisedEntity == observer && !disguise.isSelfDisguiseSoundsReplaced()) { return; }