Use resetBlock method to set air blocks

This commit is contained in:
Thanos Paravantis 2016-06-10 16:08:06 +03:00
parent 5b021d3ecc
commit 1ed27e72a6
5 changed files with 7 additions and 7 deletions

View File

@ -111,9 +111,9 @@ public class ChallengeBouncingBlock extends Challenge implements LogicTracker
{
Host.StrictAntiHack = true;
for (Block woolBlocks : _blocks)
for (Block woolBlock : _blocks)
{
setBlock(woolBlocks, Material.AIR, (byte) 0);
resetBlock(woolBlock);
}
}

View File

@ -224,7 +224,7 @@ public class ChallengeBuildRace extends Challenge implements LogicTracker
{
UtilParticle.PlayParticle(ParticleType.BLOCK_DUST.getParticle(block.getType(), block.getData()), block.getLocation(), 0.0F, 0.0F, 0.0F, 0, 10, ViewDist.NORMAL, UtilServer.getPlayers());
block.getWorld().playEffect(block.getLocation(), Effect.STEP_SOUND, block.getTypeId());
setBlock(block, Material.AIR, (byte) 0);
resetBlock(block);
}
@Override

View File

@ -190,7 +190,7 @@ public class ChallengeCloudFall extends Challenge
for (Location location : UtilShapes.getCircle(platform, false, (int) getArenaSize() / 2))
{
setBlock(location.getBlock(), Material.AIR, (byte) 0);
resetBlock(location.getBlock());
}
}

View File

@ -216,7 +216,7 @@ public class ChallengeColorChange extends Challenge
if (block.getData() != _currentColor)
{
setBlock(block, Material.AIR, (byte) 0);
resetBlock(block);
addBlock(block);
}
}

View File

@ -163,7 +163,7 @@ public class ChallengeFallingBlocks extends Challenge implements NumberTracker
for (Block block : _remaining)
{
setBlock(block, Material.AIR, (byte) 0);
resetBlock(block);
}
_remaining.clear();
@ -217,7 +217,7 @@ public class ChallengeFallingBlocks extends Challenge implements NumberTracker
UtilParticle.PlayParticle(ParticleType.BLOCK_CRACK.getParticle(block.getType(), 0), block.getLocation(), 0.3F, 0.3F, 0.3F, 0.0F, 3, ViewDist.LONG, UtilServer.getPlayers());
setBlock(block, Material.AIR, (byte) 0);
resetBlock(block);
_remaining.remove(block);
}
}.runTaskLater(Host.getArcadeManager().getPlugin(), 40L);