Fix anvils staying on map after challenge end

This commit is contained in:
Thanos Paravantis 2016-07-05 13:03:42 +03:00
parent 9f45c0a622
commit ce3117ba4b

View File

@ -124,16 +124,17 @@ public class ChallengeAnvilDance extends Challenge
}
_paused = false;
_landedAnvils.clear();
_fallingAnvils.clear();
for (Block block : _landedAnvils)
{
setBlock(block, Material.AIR);
resetBlock(block);
}
remove(EntityType.FALLING_BLOCK);
remove(EntityType.DROPPED_ITEM);
_landedAnvils.clear();
_fallingAnvils.clear();
}
@EventHandler
@ -315,7 +316,7 @@ public class ChallengeAnvilDance extends Challenge
@Override
public void run()
{
if (!Host.IsLive() || !Host.getSettings().isChallengeStarted())
if (!isChallengeValid())
{
cancel();
return;