From 345e1532a4124455c5415eb10817ae5f9be3fda0 Mon Sep 17 00:00:00 2001 From: Rainnny7 Date: Mon, 22 Apr 2024 15:36:45 -0400 Subject: [PATCH] Prevent Java versions from including unknown --- .../java/me/braydon/mc/model/server/JavaMinecraftServer.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/API/src/main/java/me/braydon/mc/model/server/JavaMinecraftServer.java b/API/src/main/java/me/braydon/mc/model/server/JavaMinecraftServer.java index f1d4c10..074fbbc 100644 --- a/API/src/main/java/me/braydon/mc/model/server/JavaMinecraftServer.java +++ b/API/src/main/java/me/braydon/mc/model/server/JavaMinecraftServer.java @@ -180,6 +180,9 @@ public final class JavaMinecraftServer extends MinecraftServer { } } JavaMinecraftVersion minecraftVersion = JavaMinecraftVersion.byProtocol(protocol); + if (minecraftVersion == JavaMinecraftVersion.UNKNOWN) { + minecraftVersion = null; + } return new Version(name, platform, protocol, supportedVersions, minecraftVersion == null ? null : minecraftVersion.getName()); } }