Skip to content

Commit

Permalink
Added PlayerProvided#scheduleOfflineRemoval
Browse files Browse the repository at this point in the history
This is a default method to schedule offline player removal, just in case a custom PlayerProvide wants to schedule this differently
  • Loading branch information
xDec0de committed Dec 31, 2024
1 parent 930521c commit c092912
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ protected void handleQuit(@NotNull ON_HANDLE handle) {
if (online == null)
return;
offlineCache.put(uuid, toOffline(online));
scheduleOfflineRemoval(uuid);
}

protected void scheduleOfflineRemoval(@NotNull UUID uuid) {
scheduler.delaySync(() -> offlineCache.remove(uuid), TimeUnit.MINUTES, 20);
}
}

0 comments on commit c092912

Please sign in to comment.