From 63df369700fee872cf18f18ffa5bc344625e878f Mon Sep 17 00:00:00 2001 From: Mysticate Date: Mon, 20 Jul 2015 10:18:50 -0400 Subject: [PATCH] Cleaned up somethings (lib's request) --- .../nautilus/game/arcade/game/games/skywars/Skywars.java | 5 +---- .../game/arcade/stats/WinWithoutDyingStatTracker.java | 6 +++--- .../arcade/stats/WinWithoutOpeningChestStatTracker.java | 8 ++++---- .../arcade/stats/WinWithoutWearingArmorStatTracker.java | 8 ++++---- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/Skywars.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/Skywars.java index c64af6eaa..c6a2003e9 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/Skywars.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/Skywars.java @@ -6,7 +6,6 @@ import java.util.HashSet; import java.util.Iterator; import mineplex.core.common.util.C; -import mineplex.core.common.util.F; import mineplex.core.common.util.MapUtil; import mineplex.core.common.util.NautHashMap; import mineplex.core.common.util.UtilAction; @@ -25,7 +24,6 @@ import mineplex.core.common.util.UtilTextMiddle; import mineplex.core.common.util.UtilTime; import mineplex.core.common.util.UtilTime.TimeUnit; import mineplex.core.explosion.ExplosionEvent; -import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.loot.ChestLoot; import mineplex.core.loot.RandomItem; import mineplex.core.updater.UpdateType; @@ -43,8 +41,8 @@ import nautilus.game.arcade.game.games.skywars.data.TNTGenerator; import nautilus.game.arcade.game.games.skywars.events.PlayerKillZombieEvent; import nautilus.game.arcade.game.games.skywars.kits.KitChicken; import nautilus.game.arcade.game.games.skywars.kits.KitDestructor; -import nautilus.game.arcade.game.games.skywars.kits.KitMiner; import nautilus.game.arcade.game.games.skywars.kits.KitMadScientist; +import nautilus.game.arcade.game.games.skywars.kits.KitMiner; import nautilus.game.arcade.kit.Kit; import nautilus.game.arcade.ore.OreHider; import nautilus.game.arcade.stats.DeathBomberStatTracker; @@ -67,7 +65,6 @@ import org.bukkit.entity.Chicken; import org.bukkit.entity.Egg; import org.bukkit.entity.EnderPearl; import org.bukkit.entity.Entity; -import org.bukkit.entity.Item; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.entity.Projectile; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/WinWithoutDyingStatTracker.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/WinWithoutDyingStatTracker.java index cb24d7b0b..5f9f990f6 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/WinWithoutDyingStatTracker.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/WinWithoutDyingStatTracker.java @@ -15,7 +15,7 @@ import org.bukkit.event.EventPriority; public class WinWithoutDyingStatTracker extends StatTracker { - private final Set _hasDied = new HashSet(); + private final Set _hasDied = new HashSet(); private final String _stat; public WinWithoutDyingStatTracker(Game game, String stat) @@ -42,7 +42,7 @@ public class WinWithoutDyingStatTracker extends StatTracker { return; } - _hasDied.add(player); + _hasDied.add(player.getUniqueId().toString()); } @EventHandler(priority = EventPriority.MONITOR) @@ -56,7 +56,7 @@ public class WinWithoutDyingStatTracker extends StatTracker { for (Player winner : winners) { - if (!_hasDied.contains(winner)) + if (!_hasDied.contains(winner.getUniqueId().toString())) { addStat(winner, _stat, 1, true, false); } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/WinWithoutOpeningChestStatTracker.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/WinWithoutOpeningChestStatTracker.java index 2f91d8f86..3a9459092 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/WinWithoutOpeningChestStatTracker.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/WinWithoutOpeningChestStatTracker.java @@ -18,7 +18,7 @@ import org.bukkit.event.player.PlayerInteractEvent; public class WinWithoutOpeningChestStatTracker extends StatTracker { - private final Set _openChest = new HashSet(); + private final Set _openChest = new HashSet(); public WinWithoutOpeningChestStatTracker(Game game) { @@ -37,7 +37,7 @@ public class WinWithoutOpeningChestStatTracker extends StatTracker { if (event.getClickedBlock() != null && event.getClickedBlock().getType() == Material.CHEST) { - _openChest.add(event.getPlayer()); + _openChest.add(event.getPlayer().getUniqueId().toString()); } } } @@ -47,7 +47,7 @@ public class WinWithoutOpeningChestStatTracker extends StatTracker { if (event.getBlock().getType() == Material.CHEST) { - _openChest.add(event.getPlayer()); + _openChest.add(event.getPlayer().getUniqueId().toString()); } } @@ -62,7 +62,7 @@ public class WinWithoutOpeningChestStatTracker extends StatTracker { for (Player winner : winners) { - if (!_openChest.contains(winner)) + if (!_openChest.contains(winner.getUniqueId().toString())) { addStat(winner, "NoChest", 1, true, false); } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/WinWithoutWearingArmorStatTracker.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/WinWithoutWearingArmorStatTracker.java index 005743742..5f2626d06 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/WinWithoutWearingArmorStatTracker.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/WinWithoutWearingArmorStatTracker.java @@ -17,7 +17,7 @@ import org.bukkit.inventory.ItemStack; public class WinWithoutWearingArmorStatTracker extends StatTracker { - private final Set _wearing = new HashSet(); + private final Set _wearing = new HashSet(); public WinWithoutWearingArmorStatTracker(Game game) { @@ -34,7 +34,7 @@ public class WinWithoutWearingArmorStatTracker extends StatTracker { for (Player player : getGame().GetPlayers(true)) { - if (_wearing.contains(player)) + if (_wearing.contains(player.getUniqueId().toString())) { continue; } @@ -43,7 +43,7 @@ public class WinWithoutWearingArmorStatTracker extends StatTracker { if (armor != null && armor.getType() != Material.AIR) { - _wearing.add(player); + _wearing.add(player.getUniqueId().toString()); break; } } @@ -62,7 +62,7 @@ public class WinWithoutWearingArmorStatTracker extends StatTracker { for (Player winner : winners) { - if (!_wearing.contains(winner)) + if (!_wearing.contains(winner.getUniqueId().toString())) { addStat(winner, "NoArmor", 1, true, false); }