diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/page/EditRotationPage.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/page/EditRotationPage.java index bde76df50..ce515adf6 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/page/EditRotationPage.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/page/EditRotationPage.java @@ -29,7 +29,7 @@ public class EditRotationPage extends BasePage int slot = 9; List enabledGames = Plugin.GetServerConfig().GameList; - for (GameType type : _manager.getAvailableGames()) + for (GameType type : _manager.getAvailableGames(Player)) { addGameButton(slot, type, enabledGames.contains(type)); slot++; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/page/SetGamePage.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/page/SetGamePage.java index 0cadb87bb..a8e757b45 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/page/SetGamePage.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/page/SetGamePage.java @@ -25,7 +25,7 @@ public class SetGamePage extends BasePage addBackButton(4); int slot = 9; - for (GameType type : _manager.getAvailableGames()) + for (GameType type : _manager.getAvailableGames(Player)) { addGameButton(slot, type); slot++; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameHostManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameHostManager.java index f296b39f9..787d45f82 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameHostManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameHostManager.java @@ -324,21 +324,20 @@ public class GameHostManager implements Listener Manager.GetGame().Announce(C.cGreen + C.Bold + _host.getName() + " has stopped the game."); } - public boolean hasRank(Rank rank) + public boolean hasRank(Player player, Rank rank) { - //TODO - return true; + return Manager.GetClients().Get(player).GetRank().Has(rank); } - public List getAvailableGames() + public List getAvailableGames(Player player) { List games = new ArrayList(); - if (hasRank(Rank.ULTRA)) + if (hasRank(player, Rank.ULTRA)) games.addAll(ultraGames); - if (hasRank(Rank.HERO)) + if (hasRank(player, Rank.HERO)) games.addAll(heroGames); - if (hasRank(Rank.MODERATOR)) + if (hasRank(player, Rank.MODERATOR)) games.addAll(legendGames); return games; @@ -356,4 +355,10 @@ public class GameHostManager implements Listener _onlineAdmins.add(player); UtilPlayer.message(player, F.main("Server", "You were given admin privileges for this private server")); } + + + public boolean isAdminOnline() + { + return _onlineAdmins.isEmpty(); + } }