Merge branch 'master' of ssh://dev.mineplex.com:7999/min/mineplex
This commit is contained in:
commit
6e1f88c14f
@ -368,7 +368,8 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
@EventHandler
|
||||
public void InventoryCancel(InventoryClickEvent event)
|
||||
{
|
||||
event.setCancelled(true);
|
||||
if (event.getWhoClicked() instanceof Player && ((Player)event.getWhoClicked()).getGameMode() != GameMode.CREATIVE)
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -67,6 +67,7 @@ public class ServerNpcPage extends ShopPageBase<ServerManager, ServerNpcShop> im
|
||||
|
||||
for (ServerInfo serverInfo : serverList)
|
||||
{
|
||||
boolean ownsUltraPackage = DonationManager.Get(Player.getName()).OwnsUnknownPackage(serverInfo.ServerType + " ULTRA") || Client.GetRank().Has(Rank.ULTRA);
|
||||
String inProgress = (serverInfo.Game == null || serverInfo.ServerType.equalsIgnoreCase("Competitive")) ? (ChatColor.RESET + C.Line + "Game in progress.") : (ChatColor.RESET + C.Line + "Click to spectate");
|
||||
String inProgressLine2 = (serverInfo.Game == null || serverInfo.ServerType.equalsIgnoreCase("Competitive")) ? null : (ChatColor.RESET + C.Line + "and wait for next game!");
|
||||
|
||||
@ -97,13 +98,31 @@ public class ServerNpcPage extends ShopPageBase<ServerManager, ServerNpcShop> im
|
||||
|
||||
if (serverInfo.CurrentPlayers >= serverInfo.MaxPlayers)
|
||||
{
|
||||
if (!Client.GetRank().Has(Rank.ULTRA))
|
||||
lore.add(openFull);
|
||||
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.");
|
||||
}
|
||||
else
|
||||
lore.add(openFullUltra);
|
||||
{
|
||||
if (!ownsUltraPackage)
|
||||
lore.add(openFull);
|
||||
else
|
||||
lore.add(openFullUltra);
|
||||
}
|
||||
}
|
||||
else
|
||||
lore.add(ChatColor.RESET + C.Line + "Click to join!");
|
||||
{
|
||||
if (serverInfo.Game.contains("Beta"))
|
||||
{
|
||||
if (ownsUltraPackage)
|
||||
lore.add(ChatColor.RESET + C.Line + "Click to join!");
|
||||
else
|
||||
lore.add(ChatColor.RESET + C.Line + "Only Ultras can play games in Beta!");
|
||||
}
|
||||
else
|
||||
lore.add(ChatColor.RESET + C.Line + "Click to join!");
|
||||
}
|
||||
|
||||
greenCount++;
|
||||
}
|
||||
@ -134,7 +153,7 @@ public class ServerNpcPage extends ShopPageBase<ServerManager, ServerNpcShop> im
|
||||
}
|
||||
else if (serverInfo.CurrentPlayers >= serverInfo.MaxPlayers)
|
||||
{
|
||||
if (!Client.GetRank().Has(Rank.ULTRA))
|
||||
if (!Client.GetRank().Has(Rank.ULTRA) || ownsUltraPackage)
|
||||
lore.add(openFull);
|
||||
else
|
||||
{
|
||||
@ -183,7 +202,7 @@ public class ServerNpcPage extends ShopPageBase<ServerManager, ServerNpcShop> im
|
||||
{
|
||||
int slots = Plugin.GetRequiredSlots(player, serverInfo.ServerType);
|
||||
|
||||
if (serverInfo.MaxPlayers - serverInfo.CurrentPlayers < slots)
|
||||
if (serverInfo.MaxPlayers - serverInfo.CurrentPlayers < slots && !(DonationManager.Get(Player.getName()).OwnsUnknownPackage(serverInfo.ServerType + " ULTRA") || Client.GetRank().Has(Rank.ULTRA)))
|
||||
{
|
||||
PlayDenySound(player);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user