Fixed an issue where players who logged out while AFK remained in Spectator mode upon rejoining. Now, on login, the plugin checks the persisted AFK list and resets those players to Survival mode.
Added a configurable login reset message (under messages.login-reset.message) that informs the player their AFK status has been reset.
Enhanced Admin Command Tab Completion:
Improved the tab completion for admin commands so that when an admin types /afk <playerName>, online player names are automatically suggested.
Combat Log & Teleport Restrictions:
Refined combat log prevention: players cannot toggle AFK if they have taken damage within a configurable duration.
Ensured that if an AFK player attempts to teleport via Spectator mode (e.g., pressing a number key), the teleport is canceled, and they are forced out of AFK.
Configurable Command Feedback:
All messages for command feedback (such as for auto-AFK toggling, reload confirmations, no-permission messages, etc.) are now fully customizable through the configuration file.
General Bug Fixes & Stability Improvements:
Various bug fixes and stability improvements have been implemented to ensure a smoother AFK management experience.
Update Log Version 1.1 Update: Enhanced AFK Plugin
Persistent AFK State:
Added functionality to store AFK players’ names in the configuration so that players are reset to Survival mode upon server restart or reload.
Admin Commands:
Administrators can now use the command /afk <playerName> to toggle AFK status for a specific player, with proper permission checks.
Improved Tab Completion:
Enhanced tab completion now suggests online player names when using admin commands (e.g., /afk <playerName>).
Combat Log Prevention:
Players cannot toggle AFK mode if they have recently taken damage, with a configurable combat log duration and message.
Spectator TP Restriction:
Prevents AFK players from teleporting via the spectator menu (e.g., by pressing number keys) and forces them out of AFK if they try.
Configurable Command Messages:
All command feedback messages (such as permission messages, auto-AFK toggling messages, and combat log messages) are now configurable in the config.yml.
We've significantly enhanced the AFK Plugin in this update! The plugin now features:
Automatic AFK Detection: Players are automatically switched to AFK mode (Spectator) after a configurable period of inactivity (default is 60 seconds). A repeating task checks each player's activity every second and sets them AFK when the timeout is reached.
Expanded Command Functionality: In addition to the standard /afk toggle, the following subcommands have been added:
/afk disable <playerName> – Disables auto-AFK for a specified player (for administrators).
/afk enable <playerName> – Re-enables auto-AFK for a specified player (for administrators).
/afk auto <enable|disable> – Allows players to toggle auto-AFK for themselves.
/afk reload – Reloads the plugin configuration without needing a full server restart.
Customizable Configuration and Persistent Settings: All title and subtitle messages, along with fade-in, stay, and fade-out times, can now be configured via the config.yml file. Additionally, changes to auto-AFK settings (i.e., which players have auto-AFK disabled) are now saved to the configuration and persist across reloads and server restarts.
Improved Tab Completion: The plugin now offers tab completion for subcommands and online player names, making it easier to use the commands.
This update gives server administrators and players more control and flexibility over AFK management while ensuring that configuration changes persist and can be applied without restarting the server. Enjoy a smoother and more customizable AFK experience on your server!