Fix dead lobbies bug.
This commit is contained in:
parent
a955526adf
commit
0b2ce48b3e
@ -57,7 +57,7 @@ public class LobbyMenu extends ShopPageBase<ServerManager, LobbyShop> implements
|
|||||||
|
|
||||||
slot = Integer.parseInt(serverInfo.Name.split("-")[1]) - 1;
|
slot = Integer.parseInt(serverInfo.Name.split("-")[1]) - 1;
|
||||||
if (slot >= 54)
|
if (slot >= 54)
|
||||||
break;
|
continue;
|
||||||
|
|
||||||
if (serverInfo.Name.equalsIgnoreCase(getPlugin().getStatusManager().getCurrentServerName()))
|
if (serverInfo.Name.equalsIgnoreCase(getPlugin().getStatusManager().getCurrentServerName()))
|
||||||
status = Material.EMERALD_BLOCK;
|
status = Material.EMERALD_BLOCK;
|
||||||
@ -81,6 +81,12 @@ public class LobbyMenu extends ShopPageBase<ServerManager, LobbyShop> implements
|
|||||||
else
|
else
|
||||||
addItem(slot, new ShopItem(status, ChatColor.UNDERLINE + "" + ChatColor.BOLD + "" + ChatColor.WHITE + "Server " + serverInfo.Name.substring(serverInfo.Name.indexOf('-') + 1), lore.toArray(new String[lore.size()]), Integer.parseInt(serverInfo.Name.substring(serverInfo.Name.indexOf('-') + 1)), false));
|
addItem(slot, new ShopItem(status, ChatColor.UNDERLINE + "" + ChatColor.BOLD + "" + ChatColor.WHITE + "Server " + serverInfo.Name.substring(serverInfo.Name.indexOf('-') + 1), lore.toArray(new String[lore.size()]), Integer.parseInt(serverInfo.Name.substring(serverInfo.Name.indexOf('-') + 1)), false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
while (slot < 54)
|
||||||
|
{
|
||||||
|
clear(slot);
|
||||||
|
slot++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Update()
|
public void Update()
|
||||||
|
Loading…
Reference in New Issue
Block a user