Fixed skywars quick shop.

Fixed issue with skywars not opening.
Fixed chest size for MPS
This commit is contained in:
Jonathan Williams 2015-08-03 02:56:24 -05:00
parent 530c40ad0c
commit af0d769d3d
3 changed files with 16 additions and 5 deletions

View File

@ -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()

View File

@ -64,7 +64,7 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
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<ServerManager, QuickShop>
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<ServerManager, QuickShop>
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()

View File

@ -42,7 +42,7 @@ public class ServerNpcPage extends ShopPageBase<ServerManager, ServerNpcShop> 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;