From 66e84b9c08d7bab162cd531dd9452e20c7128a13 Mon Sep 17 00:00:00 2001 From: Rainnny7 Date: Wed, 10 Apr 2024 04:20:59 -0400 Subject: [PATCH] Cleanup --- src/main/java/me/braydon/mc/service/MojangService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/me/braydon/mc/service/MojangService.java b/src/main/java/me/braydon/mc/service/MojangService.java index 0626f38..63a9c68 100644 --- a/src/main/java/me/braydon/mc/service/MojangService.java +++ b/src/main/java/me/braydon/mc/service/MojangService.java @@ -358,7 +358,6 @@ public final class MojangService { throw new BadRequestException("Invalid platform: %s".formatted(platformName)); } String lookupHostname = hostname; // The hostname used to lookup the server - String lookupPort = portString; // The port used to lookup the server int port = platform.getDefaultPort(); // Port to ping if (portString != null) { @@ -383,7 +382,7 @@ public final class MojangService { // Build our server model, cache it, and then return it CachedMinecraftServer minecraftServer = new CachedMinecraftServer( - platform.name() + "-" + lookupHostname + "-" + (lookupPort == null ? port : lookupPort), + platform.name() + "-" + lookupHostname + "-" + (portString == null ? port : portString), platform.getPinger().ping(hostname, port), System.currentTimeMillis() );