fall back to non-record pattern matching (appease checkstyle)

This commit is contained in:
Shane Freeder
2026-05-07 12:16:02 +01:00
parent aa9e02d79c
commit dd67dfd8d0
2 changed files with 6 additions and 6 deletions

View File

@@ -48,8 +48,8 @@ public class PlayerChooseInitialServerEvent implements ResultedEvent<PlayerChoos
}
public Optional<RegisteredServer> getInitialServer() {
if (result instanceof Allowed(RegisteredServer initialServer)) {
return Optional.ofNullable(initialServer);
if (result instanceof Allowed allowed) {
return Optional.ofNullable(allowed.initialServer());
}
return Optional.empty();
}