Cleanup
This commit is contained in:
parent
1d5aa930f0
commit
66e84b9c08
@ -358,7 +358,6 @@ public final class MojangService {
|
|||||||
throw new BadRequestException("Invalid platform: %s".formatted(platformName));
|
throw new BadRequestException("Invalid platform: %s".formatted(platformName));
|
||||||
}
|
}
|
||||||
String lookupHostname = hostname; // The hostname used to lookup the server
|
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
|
int port = platform.getDefaultPort(); // Port to ping
|
||||||
if (portString != null) {
|
if (portString != null) {
|
||||||
@ -383,7 +382,7 @@ public final class MojangService {
|
|||||||
|
|
||||||
// Build our server model, cache it, and then return it
|
// Build our server model, cache it, and then return it
|
||||||
CachedMinecraftServer minecraftServer = new CachedMinecraftServer(
|
CachedMinecraftServer minecraftServer = new CachedMinecraftServer(
|
||||||
platform.name() + "-" + lookupHostname + "-" + (lookupPort == null ? port : lookupPort),
|
platform.name() + "-" + lookupHostname + "-" + (portString == null ? port : portString),
|
||||||
platform.getPinger().ping(hostname, port),
|
platform.getPinger().ping(hostname, port),
|
||||||
System.currentTimeMillis()
|
System.currentTimeMillis()
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user