From 67f5ff7edb1d311517d267410286103a726a1e3e Mon Sep 17 00:00:00 2001 From: BuildTools Date: Mon, 21 Mar 2016 13:30:13 +0100 Subject: [PATCH] 0.3h Add liquid flow protection toggle. Fix #1037 --- src/com/massivecraft/factions/engine/EngineMain.java | 2 ++ src/com/massivecraft/factions/entity/MConf.java | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/src/com/massivecraft/factions/engine/EngineMain.java b/src/com/massivecraft/factions/engine/EngineMain.java index bb5da4c3..b569a2da 100644 --- a/src/com/massivecraft/factions/engine/EngineMain.java +++ b/src/com/massivecraft/factions/engine/EngineMain.java @@ -1536,6 +1536,8 @@ public class EngineMain extends Engine @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void blockLiquidFlow(BlockFromToEvent event) { + if ( ! MConf.get().protectionLiquidFlowEnabled) return; + // Prepare fields Block fromBlock = event.getBlock(); int fromCX = fromBlock.getX() >> 4; diff --git a/src/com/massivecraft/factions/entity/MConf.java b/src/com/massivecraft/factions/entity/MConf.java index 092099dc..8f5e6741 100644 --- a/src/com/massivecraft/factions/entity/MConf.java +++ b/src/com/massivecraft/factions/entity/MConf.java @@ -235,6 +235,12 @@ public class MConf extends Entity // 0 means there isn't. public int claimedLandsMax = 0; + // -------------------------------------------- // + // PROTECTION + // -------------------------------------------- // + + public boolean protectionLiquidFlowEnabled = true; + // -------------------------------------------- // // HOMES // -------------------------------------------- //