diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerNpcPage.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerNpcPage.java index 7b3bc0faa..7e91cc67c 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerNpcPage.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerNpcPage.java @@ -187,9 +187,10 @@ public class ServerNpcPage extends ShopPageBase im private void buildAvailableServerPage(List serverList, int slotsNeeded) { - int serversToShow = 5; + int serversToShow = 7; int greenCount = 0; int yellowCount = 0; + int maxFull = 3; int greenStartSlot = 18 + ((9 - serversToShow) / 2); boolean showGreen = true; @@ -199,6 +200,8 @@ public class ServerNpcPage extends ShopPageBase im showClock(portalTime); showGreen = false; } + + int fullCount = 0; for (ServerInfo serverInfo : serverList) { @@ -208,11 +211,19 @@ public class ServerNpcPage extends ShopPageBase im { if (showGreen) { + boolean full = serverInfo.MaxPlayers - serverInfo.CurrentPlayers <= 0; + + if (full && fullCount >= maxFull) + continue; + ShopItem shopItem = buildShopItem(serverInfo, slotsNeeded); greenCount++; AddButton(slot, shopItem, new JoinServerButton(this, serverInfo)); + + if (full) + fullCount++; } } else if (isInProgress(serverInfo))