make trainees+ not count to kicked player count
This commit is contained in:
parent
876a7a8eb6
commit
be63012d18
@ -1209,11 +1209,28 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
|
||||
return;
|
||||
}
|
||||
|
||||
if (UtilServer.getPlayers().length >= UtilServer.getServer().getMaxPlayers() && !rank.has(Rank.ADMIN) && !event.getPlayer().isWhitelisted() && !event.getPlayer().isOp())
|
||||
int online = 0;
|
||||
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
{
|
||||
if (_clientManager.hasRank(player, Rank.HELPER))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
online++;
|
||||
}
|
||||
|
||||
if (online >= UtilServer.getServer().getMaxPlayers() && !rank.has(Rank.ADMIN) && !event.getPlayer().isWhitelisted() && !event.getPlayer().isOp())
|
||||
{
|
||||
event.disallow(PlayerLoginEvent.Result.KICK_OTHER, "Clans Beta is full! Try again soon");
|
||||
event.setKickMessage("Clans Beta is full! Try again soon");
|
||||
}
|
||||
else
|
||||
{
|
||||
event.allow();
|
||||
event.setResult(PlayerLoginEvent.Result.ALLOWED);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
Loading…
Reference in New Issue
Block a user