From db382acc17304fdf32d3ad52eff5fac1358d1155 Mon Sep 17 00:00:00 2001 From: Brettflan Date: Wed, 18 Jan 2012 21:21:30 -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 admin, only regular members and/or moderators. --- 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 0fb6b65d..573f8678 100644 --- a/src/com/massivecraft/factions/Conf.java +++ b/src/com/massivecraft/factions/Conf.java @@ -108,6 +108,8 @@ public class Conf public static boolean peacefulTerritoryDisableMonsters = false; 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 204148bc..025745e3 100644 --- a/src/com/massivecraft/factions/Faction.java +++ b/src/com/massivecraft/factions/Faction.java @@ -449,6 +449,7 @@ public class Faction extends Entity implements EconomyParticipator public void promoteNewLeader() { if (! this.isNormal()) return; + if (this.isPermanent() && Conf.permanentFactionsDisableLeaderPromotion) return; FPlayer oldLeader = this.getFPlayerAdmin();