Cleanup pearls when the module is cleaned as opposed to the end game event
This commit is contained in:
parent
02290e9ed5
commit
92b51c6e43
@ -56,6 +56,12 @@ public class EnderPearlModule extends Module
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cleanup()
|
||||
{
|
||||
_pearls.clear();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void interactEnderPearl(PlayerInteractEvent event)
|
||||
{
|
||||
@ -147,15 +153,4 @@ public class EnderPearlModule extends Module
|
||||
shooter.teleport(toTeleport);
|
||||
shooter.setFallDistance(0);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void gameEnd(GameStateChangeEvent event)
|
||||
{
|
||||
if (event.GetState() != GameState.End)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_pearls.clear();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user