diff --git a/pom.xml b/pom.xml index 88cc5699..478f8f04 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ LibsDisguises LibsDisguises - 10.0.2-SNAPSHOT + 10.0.3 exec:java clean install diff --git a/src/main/java/me/libraryaddict/disguise/utilities/packets/packethandlers/PacketHandlerSpawn.java b/src/main/java/me/libraryaddict/disguise/utilities/packets/packethandlers/PacketHandlerSpawn.java index 13c53f54..332653cd 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/packets/packethandlers/PacketHandlerSpawn.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/packets/packethandlers/PacketHandlerSpawn.java @@ -158,8 +158,8 @@ public class PacketHandlerSpawn implements IPacketHandler { boolean visibleOrNewCompat = playerDisguise.isNameVisible() || DisguiseConfig.isScoreboardDisguiseNames(); WrappedGameProfile spawnProfile = visibleOrNewCompat ? playerDisguise.getGameProfile() : ReflectionManager - .getGameProfileWithThisSkin(UUID.randomUUID(), - visibleOrNewCompat ? playerDisguise.getName() : "", playerDisguise.getGameProfile()); + .getGameProfileWithThisSkin(UUID.randomUUID(), visibleOrNewCompat ? playerDisguise.getName() : "", + playerDisguise.getGameProfile()); int entityId = disguisedEntity.getEntityId(); @@ -196,10 +196,6 @@ public class PacketHandlerSpawn implements IPacketHandler { boolean selfDisguise = observer == disguisedEntity; - WrappedDataWatcher newWatcher = DisguiseUtilities - .createSanitizedDataWatcher(WrappedDataWatcher.getEntityWatcher(disguisedEntity), - disguise.getWatcher()); - // Spawn him in front of the observer StructureModifier doubles = spawnPlayer.getDoubles(); doubles.write(0, spawnAt.getX()); @@ -212,6 +208,10 @@ public class PacketHandlerSpawn implements IPacketHandler { packets.addPacket(spawnPlayer); + WrappedDataWatcher newWatcher = DisguiseUtilities + .createSanitizedDataWatcher(WrappedDataWatcher.getEntityWatcher(disguisedEntity), + disguise.getWatcher()); + if (NmsVersion.v1_15.isSupported()) { PacketContainer metaPacket = ProtocolLibrary.getProtocolManager() .createPacketConstructor(PacketType.Play.Server.ENTITY_METADATA, entityId, newWatcher, true)