New conf.json option claimsRequireMinFactionMembers (defaults to 1, effectively disabled) which can be increased to prevent small (potentially one player) factions from claiming land until they have more members

This commit is contained in:
Brettflan 2011-07-25 13:16:32 -05:00
parent 080ea3363b
commit 06f8082599
2 changed files with 6 additions and 0 deletions

View File

@ -76,6 +76,7 @@ public class Conf {
public static boolean claimsMustBeConnected = false;
public static boolean claimsCanBeUnconnectedIfOwnedByOtherFaction = true;
public static int claimsRequireMinFactionMembers = 1;
public static double considerFactionsReallyOfflineAfterXMinutes = 0;

View File

@ -476,6 +476,11 @@ public class FPlayer {
return false;
}
if (myFaction.getFPlayers().size() < Conf.claimsRequireMinFactionMembers && !Conf.adminBypassPlayers.contains(this.playerName)) {
sendMessage("Your faction must have at least "+Conf.claimsRequireMinFactionMembers+" members to claim land.");
return false;
}
if (Conf.worldsNoClaiming.contains(flocation.getWorldName())) {
sendMessage("Sorry, this world has land claiming disabled.");
return false;