Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Co-authored-by: kyngs <[email protected]>
  • Loading branch information
kyngs and kyngs authored Aug 9, 2022
1 parent 6496983 commit 3293f7a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,9 @@ <P extends MinecraftPacket> void register(Class<P> clazz, Supplier<P> packetSupp
ProtocolVersion to = current == next ? lastValid != null
? lastValid : getLast(SUPPORTED_VERSIONS) : next.protocolVersion;

if (from.compareTo(to) >= 0 && from != getLast(SUPPORTED_VERSIONS)) {
ProtocolVersion lastInList = lastValid != null ? lastValid : getLast(SUPPORTED_VERSIONS);

if (from.compareTo(to) >= 0 && from != lastInList) {
throw new IllegalArgumentException(String.format(
"Next mapping version (%s) should be lower then current (%s)", to, from));
}
Expand Down

0 comments on commit 3293f7a

Please sign in to comment.