Add option to not delete FPlayer data on auto leave.

This allows servers to only have the player leave the faction. Also prevents players from staying offline until their power resets.
This commit is contained in:
drtshock 2015-01-27 11:17:43 -06:00
parent d888b320db
commit 8fdcb51183
2 changed files with 4 additions and 1 deletions

View File

@ -81,6 +81,7 @@ public class Conf {
public static double autoLeaveRoutineRunsEveryXMinutes = 5.0; public static double autoLeaveRoutineRunsEveryXMinutes = 5.0;
public static int autoLeaveRoutineMaxMillisecondsPerTick = 5; // 1 server tick is roughly 50ms, so default max 10% of a tick public static int autoLeaveRoutineMaxMillisecondsPerTick = 5; // 1 server tick is roughly 50ms, so default max 10% of a tick
public static boolean removePlayerDataWhenBanned = true; public static boolean removePlayerDataWhenBanned = true;
public static boolean autoLeaveDeleteFPlayerData = true; // Let them just remove player from Faction.
public static boolean worldGuardChecking = false; public static boolean worldGuardChecking = false;
public static boolean worldGuardBuildPriority = false; public static boolean worldGuardBuildPriority = false;

View File

@ -61,7 +61,9 @@ public class AutoLeaveProcessTask extends BukkitRunnable {
fplayer.leave(false); fplayer.leave(false);
iterator.remove(); // go ahead and remove this list's link to the FPlayer object iterator.remove(); // go ahead and remove this list's link to the FPlayer object
fplayer.remove(); if(Conf.autoLeaveDeleteFPlayerData) {
fplayer.remove();
}
} }
} }