From 46d0e80454ced28a850ac437dcca51b28142b279 Mon Sep 17 00:00:00 2001 From: Rainnny7 Date: Tue, 9 Apr 2024 01:02:55 -0400 Subject: [PATCH] Update docs --- .../me/braydon/mc/model/server/JavaMinecraftServer.java | 3 +++ src/main/java/me/braydon/mc/service/MojangService.java | 8 ++++---- 2 files changed, 7 insertions(+), 4 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 7e22010..d0cc1b6 100644 --- a/src/main/java/me/braydon/mc/model/server/JavaMinecraftServer.java +++ b/src/main/java/me/braydon/mc/model/server/JavaMinecraftServer.java @@ -207,6 +207,9 @@ public final class JavaMinecraftServer extends MinecraftServer { private final ForgeMod[] modList; } + /** + * A forge mod for a server. + */ @AllArgsConstructor @Getter @ToString private static class ForgeMod { /** diff --git a/src/main/java/me/braydon/mc/service/MojangService.java b/src/main/java/me/braydon/mc/service/MojangService.java index 157f74e..7fa88b7 100644 --- a/src/main/java/me/braydon/mc/service/MojangService.java +++ b/src/main/java/me/braydon/mc/service/MojangService.java @@ -204,11 +204,11 @@ public final class MojangService { log.info("Requesting player with query: {}", query); UUID uuid; // The player UUID to lookup - boolean fullLength = query.length() == 36; // Was a UUID provided? - if (query.length() == 32 || fullLength) { // Parse the query as a UUID + boolean isFullUuid = query.length() == 36; // Was a UUID provided? + if (query.length() == 32 || isFullUuid) { // Parse the query as a UUID try { - uuid = fullLength ? UUID.fromString(query) : UUIDUtils.addDashes(query); - log.info("Parsed {}UUID: {} -> {}", fullLength ? "" : "trimmed ", query, uuid); + uuid = isFullUuid ? UUID.fromString(query) : UUIDUtils.addDashes(query); + log.info("Parsed {}UUID: {} -> {}", isFullUuid ? "" : "trimmed ", query, uuid); } catch (IllegalArgumentException ex) { throw new BadRequestException("Malformed UUID provided: %s".formatted(query)); }