Ignore full or dead servers

This commit is contained in:
Shaun Bennett 2014-12-23 06:26:51 -06:00
parent d40b154902
commit 9c1e3aa7aa

View File

@ -223,6 +223,9 @@ public class ServerNpcPage extends ShopPageBase<ServerManager, ServerNpcShop> im
if (serverInfo.MOTD.contains("Private")) if (serverInfo.MOTD.contains("Private"))
return; return;
if (serverInfo.MaxPlayers - serverInfo.CurrentPlayers <= 0)
return;
if (serverInfo.HostedByStaff && staffSlot < 9) if (serverInfo.HostedByStaff && staffSlot < 9)
{ {
AddButton(staffSlot, getPrivateItem(serverInfo), new JoinServerButton(this, serverInfo)); AddButton(staffSlot, getPrivateItem(serverInfo), new JoinServerButton(this, serverInfo));