New conf.json setting "territoryDenyEndermanBlocksWhenOffline" (default true). As might be expected, this will prevent Enderman from removing or placing blocks in the territory of a faction which has no members online. "territoryDenyEndermanBlocks" of course now only applies when a faction has members online.

This commit is contained in:
Brettflan 2011-10-01 06:16:53 -05:00
parent ce0559cda9
commit 58d97076b8
2 changed files with 3 additions and 1 deletions

View File

@ -130,6 +130,7 @@ public class Conf {
public static boolean territoryBlockTNT = false;
public static boolean territoryBlockTNTWhenOffline = false;
public static boolean territoryDenyEndermanBlocks = true;
public static boolean territoryDenyEndermanBlocksWhenOffline = true;
public static boolean safeZoneDenyBuild = true;
public static boolean safeZoneDenyUseage = true;

View File

@ -421,6 +421,7 @@ public class FactionsEntityListener extends EntityListener {
// quick check to see if all Enderman deny options are enabled; if so, no need to check location
if ( Conf.wildernessDenyEndermanBlocks
&& Conf.territoryDenyEndermanBlocks
&& Conf.territoryDenyEndermanBlocksWhenOffline
&& Conf.safeZoneDenyEndermanBlocks
&& Conf.warZoneDenyEndermanBlocks
) {
@ -434,7 +435,7 @@ public class FactionsEntityListener extends EntityListener {
return Conf.wildernessDenyEndermanBlocks;
}
else if (claimFaction.isNormal()) {
return Conf.territoryDenyEndermanBlocks;
return claimFaction.hasPlayersOnline() ? Conf.territoryDenyEndermanBlocks : Conf.territoryDenyEndermanBlocksWhenOffline;
}
else if (claimFaction.isSafeZone()) {
return Conf.safeZoneDenyEndermanBlocks;