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:
parent
996acdc4fb
commit
3a3b09da61
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user