From 0e54edcaf422e7eb321d621fd40593742f8817c4 Mon Sep 17 00:00:00 2001 From: Magnus Ulf Date: Wed, 3 Mar 2021 21:27:18 +0100 Subject: [PATCH] Add possibility to claim land that isn't inflated --- src/com/massivecraft/factions/engine/EngineChunkChange.java | 2 +- src/com/massivecraft/factions/entity/MConf.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/com/massivecraft/factions/engine/EngineChunkChange.java b/src/com/massivecraft/factions/engine/EngineChunkChange.java index 6b860090..924c5f7e 100644 --- a/src/com/massivecraft/factions/engine/EngineChunkChange.java +++ b/src/com/massivecraft/factions/engine/EngineChunkChange.java @@ -262,7 +262,7 @@ public class EngineChunkChange extends Engine } // ... the old faction might not be inflated enough ... - if (oldFaction.getPowerRounded() > oldFaction.getLandCount() - oldChunks.size()) + if (oldFaction.getPowerRounded() > oldFaction.getLandCount() - oldChunks.size() && MConf.get().claimingFromOthersMustBeInflated) { mplayer.msg("%s owns this land and is strong enough to keep it.", oldFaction.getName(mplayer)); event.setCancelled(true); diff --git a/src/com/massivecraft/factions/entity/MConf.java b/src/com/massivecraft/factions/entity/MConf.java index 1579229a..5388ddfd 100644 --- a/src/com/massivecraft/factions/entity/MConf.java +++ b/src/com/massivecraft/factions/entity/MConf.java @@ -215,6 +215,10 @@ public class MConf extends Entity // Is claiming from other factions even allowed? // Set this to false to disable territorial warfare altogether. public boolean claimingFromOthersAllowed = true; + + // Is it required for factions to have an inflated land/power ratio in order to have their land conquered by another faction? + // Set this to false to allow factions to invade each other without requiring them to have an inflated land/power ratio.. + public boolean claimingFromOthersMustBeInflated = true; // Is a minimum distance (measured in chunks) to other factions required? // 0 means the feature is disabled.