diff --git a/src/main/java/com/actualplayer/rememberme/RememberMe.java b/src/main/java/com/actualplayer/rememberme/RememberMe.java index 9ce6de2..03123e7 100644 --- a/src/main/java/com/actualplayer/rememberme/RememberMe.java +++ b/src/main/java/com/actualplayer/rememberme/RememberMe.java @@ -71,7 +71,11 @@ public class RememberMe { if (!chooseServerEvent.getPlayer().hasPermission("rememberme.notransfer")) { handler.getLastServerName(chooseServerEvent.getPlayer().getUniqueId()).thenAcceptAsync(lastServerName -> { if (lastServerName != null) { - getServer().getServer(lastServerName).ifPresent(chooseServerEvent::setInitialServer); + getServer().getServer(lastServerName).ifPresent((registeredServer) -> { + registeredServer.ping().thenRun(() -> { + chooseServerEvent.setInitialServer(registeredServer); + }); + }); } }).join(); } diff --git a/src/main/java/com/actualplayer/rememberme/handlers/LuckPermsHandler.java b/src/main/java/com/actualplayer/rememberme/handlers/LuckPermsHandler.java index 4e1fbfb..b4872ac 100644 --- a/src/main/java/com/actualplayer/rememberme/handlers/LuckPermsHandler.java +++ b/src/main/java/com/actualplayer/rememberme/handlers/LuckPermsHandler.java @@ -12,7 +12,6 @@ import net.luckperms.api.node.NodeType; import net.luckperms.api.node.types.MetaNode; import net.luckperms.api.query.QueryMode; import net.luckperms.api.query.QueryOptions; -import org.checkerframework.checker.nullness.Opt; import java.util.Collection; import java.util.Optional;