New setting in conf.json:

"disablePVPBetweenNeutralFaction":
false whether PvP damage will be
disabled between neutral
faction

Change-Id: I08eee177fbe69d1466a267e67ec3fd0389f83499
This commit is contained in:
Amrac 2011-07-28 16:04:11 +02:00
parent 62262a0b7d
commit aaa56ec40a
2 changed files with 7 additions and 0 deletions

View File

@ -71,6 +71,7 @@ public class Conf {
public static double homesTeleportAllowedEnemyDistance = 32; public static double homesTeleportAllowedEnemyDistance = 32;
public static boolean homesTeleportIgnoreEnemiesIfInOwnTerritory = true; public static boolean homesTeleportIgnoreEnemiesIfInOwnTerritory = true;
public static boolean disablePVPBetweenNeutralFaction = false;
public static boolean disablePVPForFactionlessPlayers = false; public static boolean disablePVPForFactionlessPlayers = false;
public static int noPVPDamageToOthersForXSecondsAfterLogin = 3; public static int noPVPDamageToOthersForXSecondsAfterLogin = 3;

View File

@ -188,6 +188,12 @@ public class FactionsEntityListener extends EntityListener {
Relation relation = defender.getRelation(attacker); Relation relation = defender.getRelation(attacker);
// You can not hurt neutral factions
if (relation.isNeutral() && Conf.disablePVPBetweenNeutralFaction) {
attacker.sendMessage("You can't hurt neutral factions");
return false;
}
// Players without faction may be hurt anywhere // Players without faction may be hurt anywhere
if (defender.getFaction().isNone()) { if (defender.getFaction().isNone()) {
return true; return true;