This release contains multiple rewrites and fixes many design flaws with the earlier version.
Rewritten core system
The old system was state based, meaning that the player was always in "one singular state".
That however became quickly a major roadblock when implementing new features introduced in this update.
The new system ditches the idea of states and is much more flexible now.
Placeholders
There is now list placeholders for both MiniPlaceholders and PlaceholderAPI that lists all players that are currently AFK.
State placeholders have been removed in this release as the state system was removed with the core rewrite.
The existing "boolean" placeholders have also been renamed to "afk".
All updated placeholders can be found in the wiki here.
New events
Added BLOCK_BREAK, COMMAND and INTERACT events.
The new default event config looks now like this:
# Which events will reset the AFK timer
# Supported values: BLOCK_BREAK, CHAT, COMMAND, INPUT, INTERACT
events = [ "BLOCK_BREAK", "CHAT", "COMMAND", "INPUT", "INTERACT" ]Notifications
In addition to the existing "You are now AFK" notification there is now a "You are no longer AFK" counterpart.
The notifications also now require afksystem.notification permission for players to be able to see them.
Broadcasts
AFKSystem can now optionally notify other players when a player's AFK state changes.
This requires afksystem.notification.broadcast permission for other players to see the notifications.
Notification configuration
All the notifications can be toggled on/off from the configuration:
[notification]
# Should we notify player when they go AFK
# Player must have the afksystem.notification permission to be able to see the notification
afk = true
# Should other players be notified when a player goes AFK
# Players must have the afksystem.notification.broadcast permission to be able to see the notification
afk-broadcast = true
# Should we notify player when they are no longer AFK
# Player must have the afksystem.notification permission to be able to see the notification
no-longer-afk = true
# Should other players be notified when a player is no longer AFK
# Players must have the afksystem.notification.broadcast permission to be able to see the notification
no-longer-afk-broadcast = trueAFK command
Players can now manually toggle their AFK state using the /afk command. Permission for the command is afksystem.command.afk.
Full Changelog: v1.1.0...v1.2.0