diff --git a/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolVersion.java b/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolVersion.java index b8bcf6c01..7a366be27 100644 --- a/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolVersion.java +++ b/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolVersion.java @@ -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 getProtocols() {