Remove slimes when server stops
This commit is contained in:
parent
b2bdfe384b
commit
6ea000fd22
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user