Remove slimes when server stops

This commit is contained in:
Shaun Bennett 2015-06-06 15:16:03 -05:00
parent b2bdfe384b
commit 6ea000fd22
2 changed files with 15 additions and 0 deletions

View File

@ -35,6 +35,15 @@ public class WorldEventManager extends MiniPlugin implements WorldEventListener
_events = new HashSet<AbstractWorldEvent>();
}
@Override
public void disable()
{
for (AbstractWorldEvent event : _events)
{
event.cancel();
}
}
private void initializeEvent(AbstractWorldEvent event)
{
assert(event != null);

View File

@ -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