From 23f93e55cfccba6bbe6382cc42ad0ac4f3a4e227 Mon Sep 17 00:00:00 2001 From: Chiss Date: Sat, 9 Aug 2014 22:59:54 +1000 Subject: [PATCH] fixed dragons destroying pregame lobby --- .../game/arcade/managers/GameLobbyManager.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java index b644d0b1e..ae897a6fc 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java @@ -28,6 +28,7 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.entity.EntityCombustEvent; +import org.bukkit.event.entity.EntityExplodeEvent; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.player.PlayerInteractEvent; @@ -1190,4 +1191,16 @@ public class GameLobbyManager implements IPacketRunnable, Listener Manager.GetGame().AddGemBooster(player); } + + @EventHandler(priority = EventPriority.LOWEST) + public void dragonBlockBreakFix(EntityExplodeEvent event) + { + if (Manager.GetGame() == null) + return; + + if (Manager.GetGame().GetState() != GameState.Recruit) + return; + + event.blockList().clear(); + } }