mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2025-01-09 01:07:36 +01:00
Don't add ProtocolVersion#unknown into ProtocolVersion#VERSION_LIST (#3697)
This commit is contained in:
parent
35ceee1a47
commit
08d8ccf6ca
@ -108,8 +108,10 @@ public class ProtocolVersion implements Comparable<ProtocolVersion> {
|
||||
* @param protocolVersion protocol version to register
|
||||
*/
|
||||
public static void register(ProtocolVersion protocolVersion) {
|
||||
VERSION_LIST.add(protocolVersion);
|
||||
VERSION_LIST.sort(ProtocolVersion::compareTo);
|
||||
if (protocolVersion != unknown) {
|
||||
VERSION_LIST.add(protocolVersion);
|
||||
VERSION_LIST.sort(ProtocolVersion::compareTo);
|
||||
}
|
||||
|
||||
final Int2ObjectMap<ProtocolVersion> versions = VERSIONS.computeIfAbsent(protocolVersion.versionType, $ -> new Int2ObjectOpenHashMap<>());
|
||||
versions.put(protocolVersion.version, protocolVersion);
|
||||
|
Loading…
Reference in New Issue
Block a user