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.

This commit is contained in:
Brettflan 2012-01-18 21:21:30 -06:00
parent dde10168ae
commit db382acc17
2 changed files with 3 additions and 0 deletions

@ -108,6 +108,8 @@ public class Conf
public static boolean peacefulTerritoryDisableMonsters = false; public static boolean peacefulTerritoryDisableMonsters = false;
public static boolean peacefulMembersDisablePowerLoss = true; public static boolean peacefulMembersDisablePowerLoss = true;
public static boolean permanentFactionsDisableLeaderPromotion = false;
public static boolean claimsMustBeConnected = false; public static boolean claimsMustBeConnected = false;
public static boolean claimsCanBeUnconnectedIfOwnedByOtherFaction = true; public static boolean claimsCanBeUnconnectedIfOwnedByOtherFaction = true;
public static int claimsRequireMinFactionMembers = 1; public static int claimsRequireMinFactionMembers = 1;

@ -449,6 +449,7 @@ public class Faction extends Entity implements EconomyParticipator
public void promoteNewLeader() public void promoteNewLeader()
{ {
if (! this.isNormal()) return; if (! this.isNormal()) return;
if (this.isPermanent() && Conf.permanentFactionsDisableLeaderPromotion) return;
FPlayer oldLeader = this.getFPlayerAdmin(); FPlayer oldLeader = this.getFPlayerAdmin();