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:
parent
d888b320db
commit
8fdcb51183
@ -81,6 +81,7 @@ public class Conf {
|
||||
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 boolean removePlayerDataWhenBanned = true;
|
||||
public static boolean autoLeaveDeleteFPlayerData = true; // Let them just remove player from Faction.
|
||||
|
||||
public static boolean worldGuardChecking = false;
|
||||
public static boolean worldGuardBuildPriority = false;
|
||||
|
@ -61,9 +61,11 @@ public class AutoLeaveProcessTask extends BukkitRunnable {
|
||||
|
||||
fplayer.leave(false);
|
||||
iterator.remove(); // go ahead and remove this list's link to the FPlayer object
|
||||
if(Conf.autoLeaveDeleteFPlayerData) {
|
||||
fplayer.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// looks like we've finished
|
||||
this.stop();
|
||||
|
Loading…
Reference in New Issue
Block a user