Added +20 player buffer for lobbies.

This commit is contained in:
Jonathan Williams 2014-07-29 21:11:07 -07:00
parent ff5bc3f485
commit f235f67aa5

View File

@ -384,7 +384,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
CoreClient client = _clientManager.Get(event.getPlayer().getName());
// Reserved Slot Check
if (Bukkit.getOnlinePlayers().length >= Bukkit.getServer().getMaxPlayers())
if (Bukkit.getOnlinePlayers().length - Bukkit.getServer().getMaxPlayers() >= 20)
{
if (!client.GetRank().Has(Rank.ULTRA))
{
@ -399,6 +399,8 @@ public class HubManager extends MiniClientPlugin<HubClient>
event.allow();
}
}
else
event.allow();
}
@EventHandler(priority = EventPriority.LOW)