Skip to content

Commit

Permalink
Planning for issue #83
Browse files Browse the repository at this point in the history
Started work on stopping reconnects from resetting timers
Laid out what needs to happen in code comments for later development
  • Loading branch information
Dart2112 committed Jan 29, 2025
1 parent 661fba0 commit ee4036f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/net/lapismc/afkplus/AFKPlusListeners.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ public class AFKPlusListeners implements Listener {

@EventHandler
public void onPlayerJoin(PlayerJoinEvent e) {
//TODO: Check here if the player has been offline for some amount of time.
//If they have only recently left then we wont run forceStop since it triggers an interact
//This will stop players from reconnecting to reset their AFK timer
//If the player has been offline for more than a few minutes, we can run forceStop as we used to
//This will ensure that all settings are reset to start tracking AFK time and interacts from right now
plugin.getPlayer(e.getPlayer()).forceStopAFK();
}

Expand Down

0 comments on commit ee4036f

Please sign in to comment.