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>();
|
_events = new HashSet<AbstractWorldEvent>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void disable()
|
||||||
|
{
|
||||||
|
for (AbstractWorldEvent event : _events)
|
||||||
|
{
|
||||||
|
event.cancel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void initializeEvent(AbstractWorldEvent event)
|
private void initializeEvent(AbstractWorldEvent event)
|
||||||
{
|
{
|
||||||
assert(event != null);
|
assert(event != null);
|
||||||
|
@ -42,6 +42,12 @@ public class SlimeBoss extends AbstractBoss
|
|||||||
protected void customCancel()
|
protected void customCancel()
|
||||||
{
|
{
|
||||||
Bukkit.broadcastMessage("Custom Cancel");
|
Bukkit.broadcastMessage("Custom Cancel");
|
||||||
|
|
||||||
|
// Remove all the slime entities!
|
||||||
|
for (SlimePart slime : _slimes)
|
||||||
|
{
|
||||||
|
slime.getEntity().remove();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user