mirror of
https://github.com/PaperMC/Velocity.git
synced 2026-06-21 09:47:44 +02:00
fall back to non-record pattern matching (appease checkstyle)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user