From 5aea1c78a44de7b8c2550bc200a214e1dde7fbb7 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Wed, 19 Feb 2020 16:32:32 +1300 Subject: [PATCH] Handle head packets for older versions --- .../disguise/utilities/packets/PacketsHandler.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/libraryaddict/disguise/utilities/packets/PacketsHandler.java b/src/main/java/me/libraryaddict/disguise/utilities/packets/PacketsHandler.java index c2618b68..67d5af89 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/packets/PacketsHandler.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/packets/PacketsHandler.java @@ -5,6 +5,7 @@ import com.comphenix.protocol.events.PacketContainer; import me.libraryaddict.disguise.disguisetypes.Disguise; import me.libraryaddict.disguise.disguisetypes.DisguiseType; import me.libraryaddict.disguise.utilities.packets.packethandlers.*; +import me.libraryaddict.disguise.utilities.reflection.NmsVersion; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; @@ -32,7 +33,11 @@ public class PacketsHandler { packetHandlers.add(new PacketHandlerCollect()); packetHandlers.add(new PacketHandlerEntityStatus()); packetHandlers.add(new PacketHandlerEquipment(this)); - //packetHandlers.add(new PacketHandlerHeadRotation()); + + if (!NmsVersion.v1_14.isSupported()) { + packetHandlers.add(new PacketHandlerHeadRotation()); + } + packetHandlers.add(new PacketHandlerMetadata(this)); packetHandlers.add(new PacketHandlerMovement()); packetHandlers.add(new PacketHandlerSpawn(this));