"autoLeaveAfterDaysOfInactivity" routine now runs only once every few minutes instead of running every time a player logs in. New setting "autoLeaveRoutineRunsEveryXMinutes" (default 5 minutes) to determine just how often the routine is run.
The routine is also slightly more careful about how it calculates how long a player has been offline.
This commit is contained in:
@@ -60,7 +60,7 @@ public class FPlayers extends PlayerEntityCollection<FPlayer>
|
||||
|
||||
for (FPlayer fplayer : FPlayers.i.get())
|
||||
{
|
||||
if (now - fplayer.getLastLoginTime() > toleranceMillis)
|
||||
if (fplayer.isOffline() && now - fplayer.getLastLoginTime() > toleranceMillis)
|
||||
{
|
||||
if (Conf.logFactionLeave || Conf.logFactionKick)
|
||||
P.p.log("Player "+fplayer.getName()+" was auto-removed due to inactivity.");
|
||||
|
||||
Reference in New Issue
Block a user