Handle head packets for older versions

This commit is contained in:
libraryaddict 2020-02-19 16:32:32 +13:00
parent 9ed5a41256
commit 5aea1c78a4
No known key found for this signature in database
GPG Key ID: 052E4FBCD257AEA4

View File

@ -5,6 +5,7 @@ import com.comphenix.protocol.events.PacketContainer;
import me.libraryaddict.disguise.disguisetypes.Disguise; import me.libraryaddict.disguise.disguisetypes.Disguise;
import me.libraryaddict.disguise.disguisetypes.DisguiseType; import me.libraryaddict.disguise.disguisetypes.DisguiseType;
import me.libraryaddict.disguise.utilities.packets.packethandlers.*; import me.libraryaddict.disguise.utilities.packets.packethandlers.*;
import me.libraryaddict.disguise.utilities.reflection.NmsVersion;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -32,7 +33,11 @@ public class PacketsHandler {
packetHandlers.add(new PacketHandlerCollect()); packetHandlers.add(new PacketHandlerCollect());
packetHandlers.add(new PacketHandlerEntityStatus()); packetHandlers.add(new PacketHandlerEntityStatus());
packetHandlers.add(new PacketHandlerEquipment(this)); 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 PacketHandlerMetadata(this));
packetHandlers.add(new PacketHandlerMovement()); packetHandlers.add(new PacketHandlerMovement());
packetHandlers.add(new PacketHandlerSpawn(this)); packetHandlers.add(new PacketHandlerSpawn(this));