New conf.json setting "newPlayerStartingFactionID" which can be used to have new players start out in a specific faction

This commit is contained in:
Brettflan 2011-09-12 22:46:20 -05:00
parent 877cfe914d
commit 249846d6ae
2 changed files with 7 additions and 0 deletions

View File

@ -39,6 +39,9 @@ public class Conf {
public static boolean newFactionsDefaultOpen = true; public static boolean newFactionsDefaultOpen = true;
// what faction ID to start new players in when they first join the server; default is 0, "no faction"
public static int newPlayerStartingFactionID = 0;
public static boolean showMapFactionKey = true; public static boolean showMapFactionKey = true;
public static boolean showNeutralFactionsOnMap = true; public static boolean showNeutralFactionsOnMap = true;
public static boolean showEnemyFactionsOnMap = true; public static boolean showEnemyFactionsOnMap = true;

View File

@ -67,6 +67,10 @@ public class FPlayer {
this.autoSafeZoneEnabled = false; this.autoSafeZoneEnabled = false;
this.autoWarZoneEnabled = false; this.autoWarZoneEnabled = false;
this.loginPvpDisabled = (Conf.noPVPDamageToOthersForXSecondsAfterLogin > 0) ? true : false; this.loginPvpDisabled = (Conf.noPVPDamageToOthersForXSecondsAfterLogin > 0) ? true : false;
if (Conf.newPlayerStartingFactionID > 0 && Faction.exists(Conf.newPlayerStartingFactionID)) {
this.factionId = Conf.newPlayerStartingFactionID;
}
} }
public void resetFactionData() { public void resetFactionData() {