Added a check do scheduler if server is null where player is standing on.
This commit is contained in:
parent
3640b6ca98
commit
28e4a91aff
@ -145,6 +145,14 @@ public class HubBalancer implements Runnable, Listener {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
proxy.getProxy().getPlayers().forEach(proxiedPlayer -> {
|
||||||
|
if (proxiedPlayer.getServer() == null) {
|
||||||
|
if (hubs.size() >= 1) // Do nothing we want to send player later on when lobbies are back online
|
||||||
|
sendToHub(proxiedPlayer);
|
||||||
|
else kickPlayer(proxiedPlayer, NO_AVAILABLE_HUB);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private ServerInfo sendToHub(ProxiedPlayer player) {
|
private ServerInfo sendToHub(ProxiedPlayer player) {
|
||||||
|
Reference in New Issue
Block a user