dmulloy2 / ProtocolLib

Provides read and write access to the Minecraft protocol with Bukkit.
GNU General Public License v2.0
982 stars 259 forks source link

SET_PROTOCOL is not working #3023

Closed vortexthedev closed 3 days ago

vortexthedev commented 1 week ago

Describe the bug 1.20.6 PacketHandshakingInSetProtocol is using ClientIntent instead of EnumProtocol.

To Reproduce Listen to PacketType.SET_PROTOCOL and try to read protocol: ProtocolLibrary.getProtocolManager().addPacketListener(new PacketAdapter(plugin, ListenerPriority.LOWEST, PacketType.Handshake.Client.SET_PROTOCOL) { @Override public void onPacketReceiving(PacketEvent event) { PacketType.Protocol state = event.getPacket().getProtocols().read(0); } });

image

Ingrim4 commented 1 week ago

This is technically not a bug. The SetProtocol packet no longer includes a Protocol enum field. Instead, it now contains a new enum called ClientIntent. Therefore, this should be considered a feature request for a new enum wrapper for ClientIntent.