From 6ea000fd22bc947b60e5a3e44f5ec4c35117df9d Mon Sep 17 00:00:00 2001 From: Shaun Bennett Date: Sat, 6 Jun 2015 15:16:03 -0500 Subject: [PATCH] Remove slimes when server stops --- .../game/clans/clans/worldevent/WorldEventManager.java | 9 +++++++++ .../clans/worldevent/event/boss/slime/SlimeBoss.java | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/WorldEventManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/WorldEventManager.java index 6506db8a6..35f06233d 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/WorldEventManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/WorldEventManager.java @@ -35,6 +35,15 @@ public class WorldEventManager extends MiniPlugin implements WorldEventListener _events = new HashSet(); } + @Override + public void disable() + { + for (AbstractWorldEvent event : _events) + { + event.cancel(); + } + } + private void initializeEvent(AbstractWorldEvent event) { assert(event != null); diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/event/boss/slime/SlimeBoss.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/event/boss/slime/SlimeBoss.java index fad9f2c1e..1e19926fd 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/event/boss/slime/SlimeBoss.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/event/boss/slime/SlimeBoss.java @@ -42,6 +42,12 @@ public class SlimeBoss extends AbstractBoss protected void customCancel() { Bukkit.broadcastMessage("Custom Cancel"); + + // Remove all the slime entities! + for (SlimePart slime : _slimes) + { + slime.getEntity().remove(); + } } @Override