From 41848d61ece39402e60f127b8a7a903a4afa0bfe Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sun, 25 Nov 2018 18:11:14 +1300 Subject: [PATCH] Set variable after cloning packet, fixes #318 --- .../packetlisteners/PacketListenerViewSelfDisguise.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/me/libraryaddict/disguise/utilities/packetlisteners/PacketListenerViewSelfDisguise.java b/src/main/java/me/libraryaddict/disguise/utilities/packetlisteners/PacketListenerViewSelfDisguise.java index bfd325f1..b33f0897 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/packetlisteners/PacketListenerViewSelfDisguise.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/packetlisteners/PacketListenerViewSelfDisguise.java @@ -109,7 +109,7 @@ public class PacketListenerViewSelfDisguise extends PacketAdapter { transformed.sendDelayed(observer); if (event.getPacketType() == Server.ENTITY_METADATA) { - event.setPacket(packet.deepClone()); + event.setPacket(packet = packet.deepClone()); for (WrappedWatchableObject watch : packet.getWatchableCollectionModifier().read(0)) { if (watch.getIndex() == 0) {