Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-03 14:50:30 +01:00
Add magical unknown protocol version, so that if it's not registered it doesn't NPE.
Dieser Commit ist enthalten in:
Ursprung
0f55402171
Commit
8e64fb8c21
@ -37,7 +37,11 @@ public class ProtocolVersion {
|
||||
}
|
||||
|
||||
public static ProtocolVersion getProtocol(int id) {
|
||||
return versions.get(id);
|
||||
if (versions.containsKey(id)) {
|
||||
return versions.get(id);
|
||||
} else {
|
||||
return new ProtocolVersion(id, "Unknown (" + id + ")");
|
||||
}
|
||||
}
|
||||
|
||||
public static List<ProtocolVersion> getProtocols() {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren