From 19b9bffc43df0dc7a2b5aeeec798ba113389738b Mon Sep 17 00:00:00 2001 From: Brettflan Date: Wed, 18 Jan 2012 21:21:26 -0600 Subject: [PATCH] New conf.json setting "permanentFactionsDisableLeaderPromotion" (default false) which, if enabled, will circumvent the promotion routine for permanent factions so that they can exist without a faction leader, only regular members and/or officers. --- src/com/massivecraft/factions/Conf.java | 2 ++ src/com/massivecraft/factions/Faction.java | 1 + 2 files changed, 3 insertions(+) diff --git a/src/com/massivecraft/factions/Conf.java b/src/com/massivecraft/factions/Conf.java index 63ca1d90..4572207b 100644 --- a/src/com/massivecraft/factions/Conf.java +++ b/src/com/massivecraft/factions/Conf.java @@ -118,6 +118,8 @@ public class Conf //public static boolean peacefulMembersDisablePowerLoss = true; + public static boolean permanentFactionsDisableLeaderPromotion = false; + public static boolean claimsMustBeConnected = false; public static boolean claimsCanBeUnconnectedIfOwnedByOtherFaction = true; public static int claimsRequireMinFactionMembers = 1; diff --git a/src/com/massivecraft/factions/Faction.java b/src/com/massivecraft/factions/Faction.java index 126439ef..6980afcb 100644 --- a/src/com/massivecraft/factions/Faction.java +++ b/src/com/massivecraft/factions/Faction.java @@ -431,6 +431,7 @@ public class Faction extends Entity implements EconomyParticipator public void promoteNewLeader() { if (! this.isNormal()) return; + if (this.getFlag(FFlag.PERMANENT) && Conf.permanentFactionsDisableLeaderPromotion) return; FPlayer oldLeader = this.getFPlayerLeader();