New "territoryDenyBuild" and "territoryDenyUseage" options, so block protection and interaction prevention can be disabled on faction claimed land. Also added trap doors to the default "territoryProtectedMaterials" list.

This commit is contained in:
Brettflan 2011-06-01 18:13:56 -05:00
parent 996acdc4fb
commit 3a3b09da61
4 changed files with 6 additions and 3 deletions

View File

@ -60,6 +60,8 @@ public class Conf {
public static double homesTeleportAllowedEnemyDistance = 32;
public static double territoryShieldFactor = 0.5;
public static boolean territoryDenyBuild = true;
public static boolean territoryDenyUseage = true;
public static boolean territoryBlockCreepers = false;
public static boolean territoryBlockFireballs = false;
public static boolean territoryBlockTNT = false;
@ -89,6 +91,7 @@ public class Conf {
static {
territoryProtectedMaterials.add(Material.WOODEN_DOOR);
territoryProtectedMaterials.add(Material.TRAP_DOOR);
territoryProtectedMaterials.add(Material.DISPENSER);
territoryProtectedMaterials.add(Material.CHEST);
territoryProtectedMaterials.add(Material.FURNACE);

View File

@ -84,7 +84,7 @@ public class FactionsBlockListener extends BlockListener {
Faction myFaction = me.getFaction();
// Cancel if we are not in our own territory
if (myFaction != otherFaction) {
if (myFaction != otherFaction && Conf.territoryDenyBuild) {
me.sendMessage("You can't "+action+" in the territory of "+otherFaction.getTag(myFaction));
return false;
}

View File

@ -287,7 +287,7 @@ public class FactionsEntityListener extends EntityListener {
Faction myFaction = me.getFaction();
// Cancel if we are not in our own territory
if (myFaction != otherFaction) {
if (myFaction != otherFaction && Conf.territoryDenyBuild) {
me.sendMessage("You can't "+action+" paintings in the territory of "+otherFaction.getTag(myFaction));
return false;
}

View File

@ -211,7 +211,7 @@ public class FactionsPlayerListener extends PlayerListener{
Faction myFaction = me.getFaction();
// Cancel if we are not in our own territory
if (myFaction != otherFaction) {
if (myFaction != otherFaction && Conf.territoryDenyUseage) {
me.sendMessage("You can't use "+TextUtil.getMaterialName(material)+" in the territory of "+otherFaction.getTag(myFaction));
return false;
}