diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/monstermaze/MonsterMaze.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/monstermaze/MonsterMaze.java index d52c5039b..dc3538511 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/monstermaze/MonsterMaze.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/monstermaze/MonsterMaze.java @@ -48,6 +48,8 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.event.entity.EntityRegainHealthEvent; import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.event.player.PlayerCommandPreprocessEvent; import org.bukkit.scoreboard.Team; public class MonsterMaze extends SoloGame @@ -60,6 +62,9 @@ public class MonsterMaze extends SoloGame private Location _center; private HashMap _launched = new HashMap(); + + private static final int JUMP_POTION_AMPLIFIER = -10; + private int _potionMult = JUMP_POTION_AMPLIFIER; @SuppressWarnings("unchecked") public MonsterMaze(ArcadeManager manager) @@ -260,6 +265,36 @@ public class MonsterMaze extends SoloGame } } + @EventHandler + public void onDebug(PlayerCommandPreprocessEvent event) + { + if (!event.getPlayer().isOp()) + return; + + if (event.getMessage().toLowerCase().contains("/setmult ")) + { + event.setCancelled(true); + Integer mult = Integer.parseInt(event.getMessage().toLowerCase().replace("/setmult ", "")); + _potionMult = mult; + + for (Player pl : GetPlayers(true)) + { + Manager.GetCondition().Clean(pl); + } + } + } + + @EventHandler + public void onBreakJumper(InventoryClickEvent event) + { + if (!InProgress()) + return; + if (!IsAlive(event.getWhoClicked())) + return; + + event.setCancelled(true); + } + @EventHandler public void PotionEffects(UpdateEvent event) { @@ -276,7 +311,7 @@ public class MonsterMaze extends SoloGame else { if (!Manager.GetCondition().HasCondition(pl, ConditionType.JUMP, null)) - Manager.GetCondition().Factory().Jump("No jumping", pl, null, 9999999, 250, true, false, false); + Manager.GetCondition().Factory().Jump("No jumping", pl, null, 9999999, _potionMult, true, false, false); } // if (!Manager.GetCondition().HasCondition(pl, ConditionType.INVISIBILITY, null)) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/monstermaze/kits/KitJumper.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/monstermaze/kits/KitJumper.java index 22c4d31a7..32841361a 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/monstermaze/kits/KitJumper.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/monstermaze/kits/KitJumper.java @@ -42,7 +42,7 @@ public class KitJumper extends ProgressingKit @Override public void GiveItems(Player player) { - player.getInventory().setItem(4, PLAYER_ITEMS[4]); - player.getInventory().setItem(8, PLAYER_ITEMS[8]); + player.getInventory().setItem(4, PLAYER_ITEMS[0]); + player.getInventory().setItem(8, PLAYER_ITEMS[1]); } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GamePlayerManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GamePlayerManager.java index 1525077bd..cef0c62ab 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GamePlayerManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GamePlayerManager.java @@ -69,7 +69,7 @@ public class GamePlayerManager implements Listener } for (Player player : Manager.GetGame().GetPlayers(true)) { - if (!Manager.GetCondition().HasCondition(player, ConditionType.INVISIBILITY)) + if (!Manager.GetCondition().HasCondition(player, ConditionType.INVISIBILITY) && Manager.GetGame().IsAlive(player) && !UtilPlayer.isSpectator(player)) { for (Player viewer : Bukkit.getOnlinePlayers()) {