From a20ae6b58d1db779718614d20b64ca3bb2f99a9b Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 17 Jun 2016 00:31:32 +0100 Subject: [PATCH] PC-540 Fixes an issue where players could lose water blocks in Speed builders. --- .../arcade/game/games/speedbuilders/SpeedBuilders.java | 10 +++++++++- .../game/games/speedbuilders/data/RecreationData.java | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/speedbuilders/SpeedBuilders.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/speedbuilders/SpeedBuilders.java index 1ff25e748..9aff3a136 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/speedbuilders/SpeedBuilders.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/speedbuilders/SpeedBuilders.java @@ -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)) { diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/speedbuilders/data/RecreationData.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/speedbuilders/data/RecreationData.java index 4fd17f57c..f8d04201e 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/speedbuilders/data/RecreationData.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/speedbuilders/data/RecreationData.java @@ -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++;