Fixed npc page ultra beta stuff.
This commit is contained in:
parent
e6080c9192
commit
11378f967f
@ -98,7 +98,7 @@ public class ServerNpcPage extends ShopPageBase<ServerManager, ServerNpcShop> im
|
||||
|
||||
if (serverInfo.CurrentPlayers >= serverInfo.MaxPlayers)
|
||||
{
|
||||
if (!serverInfo.Game.equalsIgnoreCase("Survival Games"))
|
||||
if (serverInfo.Game.equalsIgnoreCase("Survival Games"))
|
||||
{
|
||||
lore.add(ChatColor.RESET + C.Line + "Full Survival Games servers");
|
||||
lore.add(ChatColor.RESET + C.Line + "cannot be joined.");
|
||||
@ -113,9 +113,9 @@ public class ServerNpcPage extends ShopPageBase<ServerManager, ServerNpcShop> im
|
||||
}
|
||||
else
|
||||
{
|
||||
if (serverInfo.Game.contains("Beta"))
|
||||
if (getName().contains("Beta"))
|
||||
{
|
||||
if (ownsUltraPackage)
|
||||
if (DonationManager.Get(Player.getName()).OwnsUltraPackage())
|
||||
lore.add(ChatColor.RESET + C.Line + "Click to join!");
|
||||
else
|
||||
lore.add(ChatColor.RESET + C.Line + "Only Ultras can play games in Beta!");
|
||||
@ -200,6 +200,12 @@ public class ServerNpcPage extends ShopPageBase<ServerManager, ServerNpcShop> im
|
||||
|
||||
public void SelectServer(Player player, ServerInfo serverInfo)
|
||||
{
|
||||
if (getName().contains("Beta") && !(DonationManager.Get(Player.getName()).OwnsUltraPackage() || Client.GetRank().Has(Rank.ULTRA)))
|
||||
{
|
||||
PlayDenySound(player);
|
||||
return;
|
||||
}
|
||||
|
||||
int slots = Plugin.GetRequiredSlots(player, serverInfo.ServerType);
|
||||
|
||||
if (serverInfo.MaxPlayers - serverInfo.CurrentPlayers < slots && !(DonationManager.Get(Player.getName()).OwnsUnknownPackage(serverInfo.ServerType + " ULTRA") || Client.GetRank().Has(Rank.ULTRA)))
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user