faster cleanup
This commit is contained in:
parent
9518b64e3c
commit
60a6a81587
@ -244,14 +244,14 @@ public class Blizzard extends SkillActive
|
||||
@EventHandler
|
||||
public void clearInvalidSnowballedPlayers(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.SEC)
|
||||
if (event.getType() != UpdateType.FASTER)
|
||||
return;
|
||||
|
||||
for (Iterator<Entry<Projectile, Player>> snowBallIterator = _snowball.entrySet().iterator(); snowBallIterator.hasNext();)
|
||||
{
|
||||
Entry<Projectile, Player> entry = snowBallIterator.next();
|
||||
|
||||
if (!entry.getKey().isValid() || entry.getKey().getTicksLived() > 60 || !entry.getValue().isOnline())
|
||||
if (!entry.getKey().isValid() || entry.getKey().getTicksLived() > 25 || !entry.getValue().isOnline())
|
||||
{
|
||||
snowBallIterator.remove();
|
||||
entry.getKey().remove();
|
||||
|
Loading…
Reference in New Issue
Block a user