Cleanup pearls when the module is cleaned as opposed to the end game event

This commit is contained in:
Sam 2018-03-05 14:58:27 +00:00 committed by Alexander Meech
parent 02290e9ed5
commit 92b51c6e43

View File

@ -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();
}
}