Compare commits
3 Commits
ec69120a26
...
f2601f6971
Author | SHA1 | Date | |
---|---|---|---|
f2601f6971 | |||
decb38e6dd | |||
46d0e80454 |
@ -4,6 +4,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: ["master"]
|
branches: ["master"]
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
|
- .gitignore
|
||||||
- README.md
|
- README.md
|
||||||
- LICENSE
|
- LICENSE
|
||||||
- docker-compose.yml
|
- docker-compose.yml
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -19,6 +19,7 @@ cmake-build-*/
|
|||||||
out/
|
out/
|
||||||
build/
|
build/
|
||||||
work/
|
work/
|
||||||
|
target/
|
||||||
.idea_modules/
|
.idea_modules/
|
||||||
atlassian-ide-plugin.xml
|
atlassian-ide-plugin.xml
|
||||||
com_crashlytics_export_strings.xml
|
com_crashlytics_export_strings.xml
|
||||||
|
@ -207,6 +207,9 @@ public final class JavaMinecraftServer extends MinecraftServer {
|
|||||||
private final ForgeMod[] modList;
|
private final ForgeMod[] modList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A forge mod for a server.
|
||||||
|
*/
|
||||||
@AllArgsConstructor @Getter @ToString
|
@AllArgsConstructor @Getter @ToString
|
||||||
private static class ForgeMod {
|
private static class ForgeMod {
|
||||||
/**
|
/**
|
||||||
|
@ -204,11 +204,11 @@ public final class MojangService {
|
|||||||
log.info("Requesting player with query: {}", query);
|
log.info("Requesting player with query: {}", query);
|
||||||
|
|
||||||
UUID uuid; // The player UUID to lookup
|
UUID uuid; // The player UUID to lookup
|
||||||
boolean fullLength = query.length() == 36; // Was a UUID provided?
|
boolean isFullUuid = query.length() == 36; // Was a UUID provided?
|
||||||
if (query.length() == 32 || fullLength) { // Parse the query as a UUID
|
if (query.length() == 32 || isFullUuid) { // Parse the query as a UUID
|
||||||
try {
|
try {
|
||||||
uuid = fullLength ? UUID.fromString(query) : UUIDUtils.addDashes(query);
|
uuid = isFullUuid ? UUID.fromString(query) : UUIDUtils.addDashes(query);
|
||||||
log.info("Parsed {}UUID: {} -> {}", fullLength ? "" : "trimmed ", query, uuid);
|
log.info("Parsed {}UUID: {} -> {}", isFullUuid ? "" : "trimmed ", query, uuid);
|
||||||
} catch (IllegalArgumentException ex) {
|
} catch (IllegalArgumentException ex) {
|
||||||
throw new BadRequestException("Malformed UUID provided: %s".formatted(query));
|
throw new BadRequestException("Malformed UUID provided: %s".formatted(query));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user