Merge pull request #27 from Amrac/master
Disable pvp between neutral faction (conf)
This commit is contained in:
commit
e36e1419e9
@ -71,6 +71,7 @@ public class Conf {
|
||||
public static double homesTeleportAllowedEnemyDistance = 32;
|
||||
public static boolean homesTeleportIgnoreEnemiesIfInOwnTerritory = true;
|
||||
|
||||
public static boolean disablePVPBetweenNeutralFaction = false;
|
||||
public static boolean disablePVPForFactionlessPlayers = false;
|
||||
public static int noPVPDamageToOthersForXSecondsAfterLogin = 3;
|
||||
|
||||
|
@ -188,6 +188,12 @@ public class FactionsEntityListener extends EntityListener {
|
||||
|
||||
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
|
||||
if (defender.getFaction().isNone()) {
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user