From fc8685a0427c5bb54c801f90f1d542f242036099 Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 8 Jun 2022 08:30:37 +1000 Subject: [PATCH] #3311: Fix chat handling on older versions --- .../src/main/java/net/md_5/bungee/protocol/Protocol.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java b/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java index 38394808..694a474c 100644 --- a/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java +++ b/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java @@ -596,10 +596,6 @@ public enum Protocol { // Mapping is non current, but the next one may be ok ProtocolMapping nextMapping = mappings[mappingIndex + 1]; - if ( nextMapping.packetID < 0 ) - { - break; - } if ( nextMapping.protocolVersion == protocol ) { @@ -610,6 +606,11 @@ public enum Protocol } } + if ( mapping.packetID < 0 ) + { + break; + } + ProtocolData data = protocols.get( protocol ); data.packetMap.put( packetClass, mapping.packetID ); data.packetConstructors[mapping.packetID] = constructor;