If "autoLeaveAfterDaysOfInactivity" is set to 0.0 or a negative number, it's now effectively disabled
Renamed "disablePVPBetweenNeutralFaction" to "disablePVPBetweenNeutralFactions" because the grammar nazi in me calls for it a couple of minor optimizations finally, include gson.jar in the lib folder
This commit is contained in:
parent
e36e1419e9
commit
e3cb829e6b
BIN
lib/gson.jar
Normal file
BIN
lib/gson.jar
Normal file
Binary file not shown.
@ -71,7 +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 disablePVPBetweenNeutralFactions = false;
|
||||||
public static boolean disablePVPForFactionlessPlayers = false;
|
public static boolean disablePVPForFactionlessPlayers = false;
|
||||||
public static int noPVPDamageToOthersForXSecondsAfterLogin = 3;
|
public static int noPVPDamageToOthersForXSecondsAfterLogin = 3;
|
||||||
|
|
||||||
|
@ -673,6 +673,10 @@ public class FPlayer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void autoLeaveOnInactivityRoutine() {
|
public static void autoLeaveOnInactivityRoutine() {
|
||||||
|
if (Conf.autoLeaveAfterDaysOfInactivity <= 0.0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
long now = System.currentTimeMillis();
|
long now = System.currentTimeMillis();
|
||||||
double toleranceMillis = Conf.autoLeaveAfterDaysOfInactivity * 24 * 60 * 60 * 1000;
|
double toleranceMillis = Conf.autoLeaveAfterDaysOfInactivity * 24 * 60 * 60 * 1000;
|
||||||
|
|
||||||
|
@ -189,13 +189,13 @@ public class FactionsEntityListener extends EntityListener {
|
|||||||
Relation relation = defender.getRelation(attacker);
|
Relation relation = defender.getRelation(attacker);
|
||||||
|
|
||||||
// You can not hurt neutral factions
|
// You can not hurt neutral factions
|
||||||
if (relation.isNeutral() && Conf.disablePVPBetweenNeutralFaction) {
|
if (Conf.disablePVPBetweenNeutralFactions && relation.isNeutral()) {
|
||||||
attacker.sendMessage("You can't hurt neutral factions");
|
attacker.sendMessage("You can't hurt neutral factions");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Players without faction may be hurt anywhere
|
// Players without faction may be hurt anywhere
|
||||||
if (defender.getFaction().isNone()) {
|
if (!defender.hasFaction()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user