From 906762e9db037a472113ddcb58aea901bf05cd27 Mon Sep 17 00:00:00 2001 From: Thanos Paravantis Date: Thu, 14 Jul 2016 08:17:36 +0300 Subject: [PATCH] Remove debug commands --- .../game/games/mineware/BawkBawkBattles.java | 136 +++++++++--------- 1 file changed, 67 insertions(+), 69 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/BawkBawkBattles.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/BawkBawkBattles.java index 3d415a13b..0cb3a1b99 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/BawkBawkBattles.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/BawkBawkBattles.java @@ -29,7 +29,6 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageCause; import org.bukkit.event.entity.ItemSpawnEvent; import org.bukkit.event.entity.PlayerDeathEvent; import org.bukkit.event.player.PlayerArmorStandManipulateEvent; -import org.bukkit.event.player.PlayerCommandPreprocessEvent; import org.bukkit.event.player.PlayerDropItemEvent; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerMoveEvent; @@ -42,7 +41,6 @@ import org.bukkit.scheduler.BukkitRunnable; import com.google.common.collect.Lists; -import mineplex.core.common.Rank; import mineplex.core.common.util.C; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilAction; @@ -1497,73 +1495,73 @@ public class BawkBawkBattles extends TeamGame implements IThrown return ""; } - @EventHandler - public void debugCommands(PlayerCommandPreprocessEvent event) - { - Player player = event.getPlayer(); - String message = event.getMessage(); - - if (Manager.GetClients().hasRank(player, Rank.SNR_MODERATOR)) - { - if (message.startsWith("/restrict")) - { - String[] pieces = message.split(" "); - - if (pieces.length > 1) - { - String challenge = F.combine(pieces, 1, null, false).trim(); - - if (_list.restrict(challenge)) - { - UtilPlayer.message(player, F.main("Game", "Restricted to " + F.elem(challenge) + " challenge.")); - } - else - { - UtilPlayer.message(player, F.main("Game", "Could not find any challenge by that name.")); - } - } - else - { - UtilPlayer.message(player, F.main("Game", "All challenge restrictions were cleared.")); - _list.unrestrict(); - } - - event.setCancelled(true); - } - else if (message.startsWith("/skip")) - { - if (IsLive()) - { - endCurrentChallenge(); - - Announce(C.cAqua + C.Bold + player.getName() + " skipped this challenge."); - } - else - { - UtilPlayer.message(player, F.main("Game", "You cannot skip a challenge if the game is not started.")); - } - - event.setCancelled(true); - } - else if (message.startsWith("/lose")) - { - if (IsLive() && _challenge != null && IsAlive(player)) - { - setLives(player, 0); - _challenge.getData().addLostPlayer(player); - _deathEffect.playDeath(player, player.getLocation()); - GetScoreboard().ResetScore(player.getName()); - _chickenAttack.start(player); - } - else - { - UtilPlayer.message(player, F.main("Game", "You cannot lose at this time.")); - } - - event.setCancelled(true); - } - } - } +// @EventHandler +// public void debugCommands(PlayerCommandPreprocessEvent event) +// { +// Player player = event.getPlayer(); +// String message = event.getMessage(); +// +// if (Manager.GetClients().hasRank(player, Rank.SNR_MODERATOR)) +// { +// if (message.startsWith("/restrict")) +// { +// String[] pieces = message.split(" "); +// +// if (pieces.length > 1) +// { +// String challenge = F.combine(pieces, 1, null, false).trim(); +// +// if (_list.restrict(challenge)) +// { +// UtilPlayer.message(player, F.main("Game", "Restricted to " + F.elem(challenge) + " challenge.")); +// } +// else +// { +// UtilPlayer.message(player, F.main("Game", "Could not find any challenge by that name.")); +// } +// } +// else +// { +// UtilPlayer.message(player, F.main("Game", "All challenge restrictions were cleared.")); +// _list.unrestrict(); +// } +// +// event.setCancelled(true); +// } +// else if (message.startsWith("/skip")) +// { +// if (IsLive()) +// { +// endCurrentChallenge(); +// +// Announce(C.cAqua + C.Bold + player.getName() + " skipped this challenge."); +// } +// else +// { +// UtilPlayer.message(player, F.main("Game", "You cannot skip a challenge if the game is not started.")); +// } +// +// event.setCancelled(true); +// } +// else if (message.startsWith("/lose")) +// { +// if (IsLive() && _challenge != null && IsAlive(player)) +// { +// setLives(player, 0); +// _challenge.getData().addLostPlayer(player); +// _deathEffect.playDeath(player, player.getLocation()); +// GetScoreboard().ResetScore(player.getName()); +// _chickenAttack.start(player); +// } +// else +// { +// UtilPlayer.message(player, F.main("Game", "You cannot lose at this time.")); +// } +// +// event.setCancelled(true); +// } +// } +// } /* * Helper methods