Fix memory leak in ParticleFoot
This commit is contained in:
parent
6f80e21372
commit
19eeae7f7f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user