diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java index 909827f6e..fd141d5dd 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java @@ -598,7 +598,7 @@ public class ServerManager extends MiniPlugin { ServerInfo largestServer = servers.get(0); - if (largestServer.getAvailableSlots() >= MIN_SLOTS_REQUIRED) + if (largestServer.getAvailableSlots() >= MIN_SLOTS_REQUIRED || largestServer.MaxPlayers > 40) { return largestServer; } @@ -618,6 +618,9 @@ public class ServerManager extends MiniPlugin for (ServerInfo server : servers) { + if (isInProgress(server)) + continue; + if (results.size() >= count) break; if (server.getAvailableSlots() > requiredSlots) @@ -628,6 +631,11 @@ public class ServerManager extends MiniPlugin return results; } + + private boolean isInProgress(ServerInfo serverInfo) + { + return serverInfo.MOTD.contains("Progress") || serverInfo.MOTD.contains("Restarting"); + } public void ListServerNpcs(Player caller) { @@ -680,6 +688,9 @@ public class ServerManager extends MiniPlugin { for (ServerGroup serverGroup : mineplex.serverdata.servers.ServerManager.getServerRepository(region).getServerGroups(null)) { + if (serverGroup.getName().equalsIgnoreCase("Lobby")) + addServerGroup(serverGroup); + if (!serverGroup.getServerNpcName().isEmpty()) { if (!HasServerNpc(serverGroup.getServerNpcName())) @@ -805,7 +816,7 @@ public class ServerManager extends MiniPlugin public ServerNpcShop getSKYShop() { - return _serverNpcShopMap.get("SkyWars"); + return _serverNpcShopMap.get("Skywars"); } public ServerNpcShop getPlayerGamesShop() diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerGameMenu.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerGameMenu.java index f63540cbf..31a9851d0 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerGameMenu.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerGameMenu.java @@ -64,7 +64,7 @@ public class ServerGameMenu extends ShopPageBase ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("BR") + ChatColor.RESET + " other players!", })); - setItem(2, ItemStackFactory.Instance.CreateStack(Material.IRON_SWORD.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Survival Games " + C.cGray + "Last Man Standing", new String[] + setItem(2, ItemStackFactory.Instance.CreateStack(Material.IRON_SWORD.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Survival Games " + C.cGray + "Solo/Team Survival", new String[] { ChatColor.RESET + "", ChatColor.RESET + "Search for chests to find loot and ", @@ -74,7 +74,7 @@ public class ServerGameMenu extends ShopPageBase ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("HG") + ChatColor.RESET + " other players!", })); - setItem(4, ItemStackFactory.Instance.CreateStack(Material.FEATHER.getId(), (byte) 0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Skywars " + C.cGray + "Solo Survival", new String[] + setItem(4, ItemStackFactory.Instance.CreateStack(Material.FEATHER.getId(), (byte) 0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Skywars " + C.cGray + "Solo/Team Survival", new String[] { ChatColor.RESET + "", ChatColor.RESET + "16 contenders fight for the right to rule the skies!", @@ -456,7 +456,7 @@ public class ServerGameMenu extends ShopPageBase ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("SSM") + ChatColor.RESET + " other players!", }; - _superSmashCycle.add(ItemStackFactory.Instance.CreateStack(397, (byte)4, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Super Smash Mobs", desc)); + _superSmashCycle.add(ItemStackFactory.Instance.CreateStack(397, (byte)4, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch", desc)); } public void Update() 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 d484f1cbc..fe38ea991 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerNpcPage.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerNpcPage.java @@ -42,7 +42,7 @@ public class ServerNpcPage extends ShopPageBase im public ServerNpcPage(ServerManager plugin, ServerNpcShop shop, CoreClientManager clientManager, DonationManager donationManager, String name, Player player, String serverNpcKey) { - super(plugin, shop, clientManager, donationManager, name, player, 27); + super(plugin, shop, clientManager, donationManager, name, player, 54); _serverNpcKey = serverNpcKey; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerTypePage.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerTypePage.java index 0c9d6951a..5eb10705b 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerTypePage.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerTypePage.java @@ -55,7 +55,7 @@ public class ServerTypePage extends ShopPageBase setItem(12, ItemStackFactory.Instance.CreateStack(Material.SKULL_ITEM.getId(), (byte)3, 1, ChatColor.RESET + C.cYellow + "Solo " + friendlyName, new String[] { ChatColor.RESET + "", - ChatColor.RESET + C.cRed + C.Bold + "WARNING:" + ChatColor.RESET + "Teaming in Solo Mode is bannable!", + ChatColor.RESET + C.cRed + C.Bold + "WARNING: " + ChatColor.RESET + "Teaming in Solo Mode is bannable!", ChatColor.RESET + "", ChatColor.RESET + C.cGreen + "Click to Play", }));