From 2e1b1b7a064cc65e62fc8bae941f71157f8564fd Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Tue, 29 Nov 2016 03:00:03 +1300 Subject: [PATCH] Fixed player disguises not having proper metadata --- .../libraryaddict/disguise/utilities/PacketsManager.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/me/libraryaddict/disguise/utilities/PacketsManager.java b/src/me/libraryaddict/disguise/utilities/PacketsManager.java index 9bec63cf..3f12abd0 100644 --- a/src/me/libraryaddict/disguise/utilities/PacketsManager.java +++ b/src/me/libraryaddict/disguise/utilities/PacketsManager.java @@ -58,7 +58,7 @@ public class PacketsManager { public static class LibsPackets { private ArrayList packets = new ArrayList(); private HashMap> delayedPackets = new HashMap>(); - private boolean isSpawnPlayer; + private boolean isSpawnPacket; private Disguise disguise; private boolean doNothing; @@ -79,7 +79,7 @@ public class PacketsManager { } public void setPacketType(PacketType type) { - isSpawnPlayer = type.name().contains("SPAWN_"); + isSpawnPacket = type.name().contains("SPAWN_"); } public void addPacket(PacketContainer packet) { @@ -122,7 +122,7 @@ public class PacketsManager { e.printStackTrace(); } - if (isSpawnPlayer) { + if (isSpawnPacket) { PacketsManager.removeCancel(disguise, observer); } } @@ -392,8 +392,6 @@ public class PacketsManager { PacketContainer metaPacket = new PacketContainer(Play.Server.ENTITY_METADATA); newWatcher = createDataWatcher(WrappedDataWatcher.getEntityWatcher(disguisedEntity), disguise.getWatcher()); - newWatcher.setObject(new WrappedDataWatcherObject(FlagType.ENTITY_META.getIndex(), Registry.get(Byte.class)), - (byte) 0); metaPacket.getIntegers().write(0, entityId); // Id metaPacket.getWatchableCollectionModifier().write(0, newWatcher.getWatchableObjects());