faster cleanup

This commit is contained in:
Cheese 2015-11-14 13:03:41 +11:00
parent 9518b64e3c
commit 60a6a81587

View File

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