From ae874392aba8b0949f69f6cd1dfd21a89ecefba4 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Thu, 6 Mar 2014 05:13:17 +1300 Subject: [PATCH] Clone the packet, should resolve people hearing invisible disguises sounds --- src/me/libraryaddict/disguise/utilities/PacketsManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/me/libraryaddict/disguise/utilities/PacketsManager.java b/src/me/libraryaddict/disguise/utilities/PacketsManager.java index 21ee8d7d..64c51894 100644 --- a/src/me/libraryaddict/disguise/utilities/PacketsManager.java +++ b/src/me/libraryaddict/disguise/utilities/PacketsManager.java @@ -486,8 +486,10 @@ public class PacketsManager { PacketType.Play.Server.ENTITY_STATUS) { @Override public void onPacketSending(PacketEvent event) { - if (event.isCancelled()) + if (event.isCancelled()) { return; + } + event.setPacket(event.getPacket().deepClone()); StructureModifier mods = event.getPacket().getModifier(); Player observer = event.getPlayer(); if (event.getPacketType() == PacketType.Play.Server.NAMED_SOUND_EFFECT) {