From 99938b446283838e05efe1f556fb0dd62963cea8 Mon Sep 17 00:00:00 2001 From: AlexTheCoder Date: Wed, 9 Aug 2017 16:32:37 -0400 Subject: [PATCH] Make code compile --- .../src/nautilus/game/arcade/GameType.java | 1 - .../arcade/stats/KingDamageStatTracker.java | 54 ------------------- .../arcade/stats/KingSlayerStatTracker.java | 23 -------- 3 files changed, 78 deletions(-) delete mode 100644 Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/KingDamageStatTracker.java delete mode 100644 Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/KingSlayerStatTracker.java diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/GameType.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/GameType.java index f8e7597aa..8eb7664ff 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/GameType.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/GameType.java @@ -26,7 +26,6 @@ import nautilus.game.arcade.game.games.buildmavericks.BuildMavericks; import nautilus.game.arcade.game.games.cards.Cards; import nautilus.game.arcade.game.games.castleassault.CastleAssault; import nautilus.game.arcade.game.games.castleassault.CastleAssaultTDM; -import nautilus.game.arcade.game.games.castlesiege.CastleSiege; import nautilus.game.arcade.game.games.castlesiegenew.CastleSiegeNew; import nautilus.game.arcade.game.games.champions.ChampionsCTF; import nautilus.game.arcade.game.games.champions.ChampionsDominate; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/KingDamageStatTracker.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/KingDamageStatTracker.java deleted file mode 100644 index 5b84ac9af..000000000 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/KingDamageStatTracker.java +++ /dev/null @@ -1,54 +0,0 @@ -package nautilus.game.arcade.stats; - -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; - -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.EventPriority; - -import nautilus.game.arcade.events.GameStateChangeEvent; -import nautilus.game.arcade.game.Game; -import nautilus.game.arcade.game.games.castlesiege.CastleSiege; - -public class KingDamageStatTracker extends StatTracker -{ - private final Map _kingDamage = new HashMap<>(); - private double _totalKingDamage = 0; - - public KingDamageStatTracker(CastleSiege game) - { - super(game); - } - - @EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR) - public void onKingDamage(CastleSiege.KingDamageEvent event) - { - if (getGame().GetState() != Game.GameState.Live) - return; - - _totalKingDamage += event.getDamage(); - - Double damage = _kingDamage.get(event.getPlayer().getUniqueId()); - - damage = (damage == null ? 0 : damage) + event.getDamage(); - - _kingDamage.put(event.getPlayer().getUniqueId(), damage); - } - - @EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR) - public void onGameStateChange(GameStateChangeEvent event) - { - if (event.GetState() == Game.GameState.End) - { - for (Player player : getGame().GetPlayers(false)) - { - Double damage = _kingDamage.get(player.getUniqueId()); - - if (damage != null && damage >= 0.5 * _totalKingDamage) - addStat(player, "Assassin", 1, true, false); - } - } - } -} diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/KingSlayerStatTracker.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/KingSlayerStatTracker.java deleted file mode 100644 index c229272e5..000000000 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/KingSlayerStatTracker.java +++ /dev/null @@ -1,23 +0,0 @@ -package nautilus.game.arcade.stats; - -import org.bukkit.event.EventHandler; - -import nautilus.game.arcade.game.Game; -import nautilus.game.arcade.game.games.castlesiege.CastleSiege; - -public class KingSlayerStatTracker extends StatTracker -{ - public KingSlayerStatTracker(Game game) - { - super(game); - } - - @EventHandler - public void onKingSlaughtered(CastleSiege.KingSlaughterEvent event) - { - if (getGame().GetState() != Game.GameState.Live) - return; - - addStat(event.getPlayer(), "KingSlayer", 1, true, false); - } -}