Fixes an issue where players could lose water blocks in Speed builders.
This commit is contained in:
Sam 2016-06-17 00:31:32 +01:00
parent 79085c1ecf
commit a20ae6b58d
2 changed files with 10 additions and 1 deletions

View File

@ -17,6 +17,7 @@ import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilEvent;
import mineplex.core.common.util.UtilEvent.ActionType;
import mineplex.core.common.util.UtilInv;
import mineplex.core.common.util.UtilItem;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer;
@ -1541,6 +1542,13 @@ public class SpeedBuilders extends SoloGame
UtilPlayer.message(event.getPlayer(), F.main("Build", "Cannot build outside your area!"));
}
else
{
if (liquid.getType() == Material.STATIONARY_WATER)
{
event.setCancelled(true);
}
}
}
@EventHandler
@ -1713,7 +1721,7 @@ public class SpeedBuilders extends SoloGame
return;
}
Block block = event.getClickedBlock();
Block block = event.getClickedBlock().getRelative(event.getBlockFace());
if (!_buildRecreations.get(event.getPlayer()).inBuildArea(block))
{

View File

@ -324,6 +324,7 @@ public class RecreationData
score++;
}
//Fix for glowing redstone ore
if (expectedState.getType() == Material.REDSTONE_ORE && currentBlock.getType() == Material.GLOWING_REDSTONE_ORE)
{
score++;