From 82162b5f6361a70a7c992ebcb84b9b130e319c30 Mon Sep 17 00:00:00 2001 From: Rainnny7 Date: Tue, 9 Apr 2024 01:23:55 -0400 Subject: [PATCH] Fix server favicon URLs being incorrect --- .../me/braydon/mc/model/server/JavaMinecraftServer.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/me/braydon/mc/model/server/JavaMinecraftServer.java b/src/main/java/me/braydon/mc/model/server/JavaMinecraftServer.java index d0cc1b6..7a02e4c 100644 --- a/src/main/java/me/braydon/mc/model/server/JavaMinecraftServer.java +++ b/src/main/java/me/braydon/mc/model/server/JavaMinecraftServer.java @@ -107,8 +107,8 @@ public final class JavaMinecraftServer extends MinecraftServer { motdString = new TextComponent(ComponentSerializer.parse(RESTfulMC.GSON.toJson(token.getDescription()))).toLegacyText(); } return new JavaMinecraftServer(hostname, ip, port, token.getVersion().detailedCopy(), token.getPlayers(), - MOTD.create(motdString), Favicon.create(token.getFavicon(), Platform.JAVA, hostname), - token.getModInfo(), token.isEnforcesSecureChat(), token.isPreventsChatReports(), false + MOTD.create(motdString), Favicon.create(token.getFavicon(), hostname), token.getModInfo(), + token.isEnforcesSecureChat(), token.isPreventsChatReports(), false ); } @@ -176,17 +176,16 @@ public final class JavaMinecraftServer extends MinecraftServer { * Create a new favicon for a server. * * @param base64 the Base64 encoded favicon - * @param platform the platform to create the favicon for * @param hostname the server hostname * @return the favicon, null if none */ - public static Favicon create(String base64, @NonNull Platform platform, @NonNull String hostname) { + public static Favicon create(String base64, @NonNull String hostname) { if (base64 == null) { // No favicon to create return null; } return new Favicon( base64, - AppConfig.INSTANCE.getServerPublicUrl() + "/server/icon/" + platform.name().toLowerCase() + "/" + hostname + AppConfig.INSTANCE.getServerPublicUrl() + "/server/icon/" + hostname ); } }