commit
e02abf3380
@ -86,9 +86,13 @@ public class Conf {
|
||||
public static double territoryShieldFactor = 0.3;
|
||||
public static boolean territoryDenyBuild = true;
|
||||
public static boolean territoryDenyBuildWhenOffline = true;
|
||||
public static boolean territoryPainBuild = true;
|
||||
public static boolean territoryPainBuildWhenOffline = true;
|
||||
public static boolean territoryDenyUseage = true;
|
||||
public static boolean territoryEnemyDenyBuild = true;
|
||||
public static boolean territoryEnemyDenyBuildWhenOffline = true;
|
||||
public static boolean territoryEnemyPainBuild = true;
|
||||
public static boolean territoryEnemyPainBuildWhenOffline = true;
|
||||
public static boolean territoryEnemyDenyUseage = true;
|
||||
public static boolean territoryEnemyProtectMaterials = true;
|
||||
public static boolean territoryBlockCreepers = false;
|
||||
@ -104,6 +108,7 @@ public class Conf {
|
||||
public static boolean ownedAreasModeratorsCanSet = false;
|
||||
public static boolean ownedAreaModeratorsBypass = true;
|
||||
public static boolean ownedAreaDenyBuild = true;
|
||||
public static boolean ownedAreaPainBuild = true;
|
||||
public static boolean ownedAreaProtectMaterials = true;
|
||||
public static boolean ownedAreaDenyUseage = true;
|
||||
|
||||
|
@ -192,16 +192,30 @@ public class FactionsBlockListener extends BlockListener {
|
||||
me.sendMessage("You can't "+action+" in the territory of "+otherFaction.getTag(myFaction));
|
||||
return false;
|
||||
}
|
||||
//added by Bladedpenguin@gmail.com
|
||||
//if not denybuild, hurt the player for building?
|
||||
else if (
|
||||
(online && (areEnemies ? Conf.territoryEnemyPainBuild : Conf.territoryPainBuild))
|
||||
|| (!online && (areEnemies ? Conf.territoryEnemyPainBuildWhenOffline : Conf.territoryPainBuildWhenOffline))
|
||||
) {
|
||||
me.sendMessage("You are hurt for "+action+" in the territory of "+otherFaction.getTag(myFaction));
|
||||
player.damage(1);
|
||||
}
|
||||
}
|
||||
// Also cancel if player doesn't have ownership rights for this claim
|
||||
// Also restructured by bladedpenguin/locutus
|
||||
else if (
|
||||
Conf.ownedAreasEnabled
|
||||
&& Conf.ownedAreaDenyBuild
|
||||
&& !myFaction.playerHasOwnershipRights(me, loc)
|
||||
&& !Factions.hasPermOwnershipBypass(player)
|
||||
) {
|
||||
if (Conf.ownedAreaDenyBuild){
|
||||
me.sendMessage("You can't "+action+" in this territory, it is owned by: "+myFaction.getOwnerListString(loc));
|
||||
return false;
|
||||
} else if (Conf.ownedAreaPainBuild){
|
||||
me.sendMessage("You are hurt for "+action+" in this territory, it is owned by: "+myFaction.getOwnerListString(loc));
|
||||
player.damage(1);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user