Fix memory leak in ParticleFoot

This commit is contained in:
samczsun 2016-10-02 12:14:21 -04:00 committed by Shaun Bennett
parent 6f80e21372
commit 19eeae7f7f

View File

@ -50,8 +50,6 @@ public class ParticleFoot extends ParticleGadget
_foot = !_foot;
cleanSteps();
if (!Manager.isMoving(player)) return;
if (!UtilEnt.isGrounded(player)) return;
@ -85,6 +83,15 @@ public class ParticleFoot extends ParticleGadget
UtilServer.getPlayers());
}
@EventHandler
public void cleanup(UpdateEvent event)
{
if (event.getType() != UpdateType.FASTEST)
return;
cleanSteps();
}
public void cleanSteps()
{
if (_steps.isEmpty()) return;