diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java index 0a73a0f96..f5ab85d39 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java @@ -5,8 +5,6 @@ import java.util.ArrayList; import java.util.HashSet; import mineplex.core.google.GoogleSheetsManager; -import net.minecraft.server.v1_8_R3.EntityLiving; - import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.GameMode; @@ -40,6 +38,8 @@ import mineplex.core.MiniPlugin; import mineplex.core.account.CoreClient; import mineplex.core.account.CoreClientManager; import mineplex.core.achievement.AchievementManager; +import mineplex.core.antihack.compedaccount.CompromisedAccountManager; +import mineplex.core.antihack.compedaccount.PriorityCause; import mineplex.core.blockrestore.BlockRestore; import mineplex.core.blood.Blood; import mineplex.core.bonuses.BonusManager; @@ -124,7 +124,6 @@ import mineplex.minecraft.game.core.condition.ConditionManager; import mineplex.minecraft.game.core.damage.DamageManager; import mineplex.minecraft.game.core.fire.Fire; import mineplex.serverdata.Region; - import nautilus.game.arcade.addons.SoupAddon; import nautilus.game.arcade.booster.GameBoosterManager; import nautilus.game.arcade.command.CancelNextGameCommand; @@ -169,6 +168,7 @@ import nautilus.game.arcade.managers.lobby.current.NewGameLobbyManager; import nautilus.game.arcade.managers.lobby.legacy.LegacyGameLobbyManager; import nautilus.game.arcade.player.ArcadePlayer; import nautilus.game.arcade.shop.ArcadeShop; +import net.minecraft.server.v1_8_R3.EntityLiving; public class ArcadeManager extends MiniPlugin implements IRelation { @@ -264,13 +264,14 @@ public class ArcadeManager extends MiniPlugin implements IRelation public final boolean IsHolidayEnabled; private final Titles _titles; + private final CompromisedAccountManager _compromisedAccountManager = require(CompromisedAccountManager.class); public ArcadeManager(Arcade plugin, ServerStatusManager serverStatusManager, GameServerConfig serverConfig, - CoreClientManager clientManager, DonationManager donationManager, DamageManager damageManager, - StatsManager statsManager, IncognitoManager incognitoManager, AchievementManager achievementManager, DisguiseManager disguiseManager, Creature creature, Teleport teleport, Blood blood, Chat chat, - Portal portal, PreferencesManager preferences, InventoryManager inventoryManager, PacketHandler packetHandler, - CosmeticManager cosmeticManager, ProjectileManager projectileManager, PetManager petManager, HologramManager hologramManager, PollManager pollManager, - NpcManager npcManager, CustomDataManager customDataManager, Punish punish, EloManager eloManager, ThankManager thankManager, BoosterManager boosterManager) + CoreClientManager clientManager, DonationManager donationManager, DamageManager damageManager, + StatsManager statsManager, IncognitoManager incognitoManager, AchievementManager achievementManager, DisguiseManager disguiseManager, Creature creature, Teleport teleport, Blood blood, Chat chat, + Portal portal, PreferencesManager preferences, InventoryManager inventoryManager, PacketHandler packetHandler, + CosmeticManager cosmeticManager, ProjectileManager projectileManager, PetManager petManager, HologramManager hologramManager, PollManager pollManager, + NpcManager npcManager, CustomDataManager customDataManager, Punish punish, EloManager eloManager, ThankManager thankManager, BoosterManager boosterManager) { super("Game Manager", plugin); @@ -497,7 +498,6 @@ public class ArcadeManager extends MiniPlugin implements IRelation scoreboard.get(ArcadeScoreboardLine.PLAYERS_NAME).write(C.cYellow + C.Bold + "Players"); scoreboard.get(ArcadeScoreboardLine.KIT_NAME).write(C.cGray + C.Bold + "Kit"); - scoreboard.get(ArcadeScoreboardLine.GEM_NAME).write(C.cGreen + C.Bold + "Gems"); scoreboard.get(ArcadeScoreboardLine.SERVER_NAME).write(C.cAqua + C.Bold + "Server"); scoreboard.get(ArcadeScoreboardLine.SERVER_VALUE).write(_plugin.getConfig().getString("serverstatus.name")); } @@ -522,7 +522,16 @@ public class ArcadeManager extends MiniPlugin implements IRelation } scoreboard.get(ArcadeScoreboardLine.PLAYERS_VALUE).write(_gameManager.getValidPlayersForGameStart().size() + "/" + GetPlayerFull()); - scoreboard.get(ArcadeScoreboardLine.GEM_VALUE).write(donationManager.Get(scoreboard.getOwner()).getBalance(GlobalCurrency.GEM)); + if (GetGame() != null && GetGame().CrownsEnabled) + { + scoreboard.get(ArcadeScoreboardLine.GEM_NAME).write(C.cGold + C.Bold + "Crowns"); + scoreboard.get(ArcadeScoreboardLine.GEM_VALUE).write(donationManager.getCrowns(scoreboard.getOwner())); + } + else + { + scoreboard.get(ArcadeScoreboardLine.GEM_NAME).write(C.cGreen + C.Bold + "Gems"); + scoreboard.get(ArcadeScoreboardLine.GEM_VALUE).write(donationManager.Get(scoreboard.getOwner()).getBalance(GlobalCurrency.GEM)); + } if (GetGame() != null) { @@ -794,11 +803,6 @@ public class ArcadeManager extends MiniPlugin implements IRelation return _customDataManager; } - public GoogleSheetsManager getSheetsManager() - { - return _sheetsManager; - } - public ChatColor GetColor(Player player) { if (_game == null) @@ -952,21 +956,21 @@ public class ArcadeManager extends MiniPlugin implements IRelation } //Recruiting else */if (_game == null || _game.GetState() == GameState.Recruit) + { + if (_game != null && _game.GetCountdown() != -1) { - if (_game != null && _game.GetCountdown() != -1) - { - event.setMotd(ChatColor.GREEN + "Starting in " + _game.GetCountdown() + " Seconds" + extrainformation); - } - else - { - event.setMotd(ChatColor.GREEN + "Recruiting" + extrainformation); - } + event.setMotd(ChatColor.GREEN + "Starting in " + _game.GetCountdown() + " Seconds" + extrainformation); } - //In Progress else { - event.setMotd(ChatColor.YELLOW + "In Progress" + extrainformation); + event.setMotd(ChatColor.GREEN + "Recruiting" + extrainformation); } + } + //In Progress + else + { + event.setMotd(ChatColor.YELLOW + "In Progress" + extrainformation); + } if (UtilServer.isTestServer(false)) event.setMotd(ChatColor.GOLD + "Private Mineplex Test Server"); @@ -981,6 +985,8 @@ public class ArcadeManager extends MiniPlugin implements IRelation @EventHandler public void MessageJoin(PlayerJoinEvent event) { + _compromisedAccountManager.triggerPriorityBan(event.getPlayer(), PriorityCause.JOIN_GAME); + if (_incognitoManager.Get(event.getPlayer()).Status) { event.setJoinMessage(null); @@ -2072,4 +2078,14 @@ public class ArcadeManager extends MiniPlugin implements IRelation { return this._titles; } -} + + public GoogleSheetsManager getSheetsManager() + { + return _sheetsManager; + } + + public CompromisedAccountManager getCompromisedAccountManager() + { + return _compromisedAccountManager; + } +} \ No newline at end of file