Wiki
Clone wikiAdvancedAFK / Home
Description
Are you tired of boring old default player-idle-timeout
setting? Do you want more options? Then you've come to the right place and you should take a look at this all-in-one AFK solution for you server! AdvancedAFK is very lightweight for your server resources, but still manages to pack a ton of AFK-related features!
Commands
Arguments: <required> [optional]
- /afk [player reason|reason]
- Toggle your or other player's AFK mode.
- Permissions: advancedafk.commands.afk, advancedafk.commands.afk.others
- Default alias: /a
- /checkafk <player>
- Check AFK player's info.
- Permission: advancedafk.commands.checkafk
- Default aliases: /cafk, /ca
- /advancedafk [reload|set]
- Reload the plugin or set the teleport location.
- Permission: advancedafk.commands.main
- Default aliases: /aafk, /aa
Config explanation
General
- disabled-worlds: list of worlds this plugin is disabled in; if you want to allow every world, delete the list and put
[]
afterdisabled-worlds:
- broadcast: when should the plugin broadcast player's AFK status change
- everyone: whether to broadcast AFK status change to everyone in the server
- player: whether to broadcast AFK status change only to the player whose status is changed (above must be
false
) - if-dead: whether to broadcast AFK status change when player is dead
- anti-spam:
- enabled: whether to limit the usage of
/afk
command - cooldown: time in seconds player has to wait before they can use the
/afk
command again
- enabled: whether to limit the usage of
Commands
- <command>: name of the command
- description: description what the command does
- usage: message shown when the command wasn't entered correctly
- aliases: list of aliases that can be used instead of the command name
Auto
- interval: time in seconds between each AFK check (recommended: 5 - 30)
- afk:
- enabled: whether inactive players should be automatically put into AFK mode
- delay: time in seconds player should be inactive for this to activate
- teleport:
- enabled: whether inactive players should be automatically teleported to safety; before enabling, please set the teleport location first
- delay: time in seconds player should be inactive for this to activate
- location: the location where players are teleported to; you can set this in-game using the command
/advancedafk set
- kick:
- enabled: whether inactive players should be automatically kicked from the server
- delay: time in seconds player should be inactive for this to activate
- only-if-full: whether to kick inactive players only when the server is full
- as-console: whether to excecute the commands below as console (
true
) or player (false
) - commands: list of commands (without
/
) that are executed when player is supposed to be kicked; variables %player% and %displayname% are supported
Misc
- ignore-sleep: whether the players in AFK mode should be exempt from sleeping to skip the night
- protection:
- moving: whether the players in AFK mode should be protected from moving and being moved
- damage: whether the players in AFK mode should be protected from taking damage
- particles:
- enabled: whether the players in AFK mode should be marked with particles
- type: the type of particle (https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Particle.html)
- amount: amount of particles created every second
Prefix
- tablist:
- enabled: whether to add prefix to the AFK player's name in tablist
- prefix: the prefix itself
- playertag:
- enabled: whether to add prefix to the AFK player's name above the player
- prefix: the prefix itself
Countdown
- <type>: the type of countdown
- enabled: whether countdown is enabled for this type
- title: the main title of the countdown; leave empty (
''
) to disable; variable%count%
is supported - subtitle: the subtitle of the countdown; leave empty (
''
) to disable; variable%count%
is supported - sound: countdown sound (https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html); set to
false
to disable sound
Presets
If a player is given permissions for multiple presets at the same time, the one listed first takes precedence.
- <name>: name of the preset, used in permission node (
advancedafk.preset.<name>
)- <type>: the delay in seconds that overrides the default delay for the player who has the preset permission
Listeners
- commands: whether sending commands should remove player's AFK mode
- chat: whether sending chat messages should remove player's AFK mode
- bed-enter: whether entering beds should remove player's AFK mode
- world-change: whether changing worlds should remove player's AFK mode
- book-edit: whether editing books should remove player's AFK mode
- shear: whether shearing animals should remove player's AFK mode
- unleash: whether unleashing animals should remove player's AFK mode
- move: whether moving should remove player's AFK mode;
false
is recommended to block most anti-AFK machines - xp: whether receiving XP should remove player's AFK mode
- interact:
- entity: whether interacting with entities should remove player's AFK mode
- anything: whether interacting with anything at all (except left clicks on blocks - see
block.left-click
for that) should remove player's AFK mode
- item:
- drop: whether dropping items should remove player's AFK mode
- pickup: whether picking items up should remove player's AFK mode
- break: whether breaking items should remove player's AFK mode
- block:
- place: whether placing blocks should remove player's AFK mode
- break: whether breaking blocks should remove player's AFK mode
- left-click: whether left clicking blocks should remove player's AFK mode
- toggle:
- flight: whether toggling flying should remove player's AFK mode
- sprint: whether toggling sprinting should remove player's AFK mode
- sneak: whether toggling sneaking should remove player's AFK mode;
false
is recommended to block anti-AFK auto-sneak
- bucket:
- fill: whether filling buckets should remove player's AFK mode
- empty: whether emptying buckets should remove player's AFK mode
Messages
If you wish to disable a message, replace it with ''
. Text formatting is supported (https://minecraft.gamepedia.com/Formatting_codes).
%player%
is replaced with player's name (only onnot-found
,afk.enabled
,afk.enabled-reason
,afk.disabled
,checkafk.first-line
,checkafk.lines
)%displayname%
is replaced with player's displayname (only onafk.enabled
,afk.enabled-reason
,afk.disabled
,checkafk.first-line
,checkafk.lines
)%reason%
is replaced with the reason for going AFK specified in the command (only onafk.enabled-reason
)%seconds%
is replaced with number of seconds left (only onprotection.spam
)%status%
is replaced with player's AFK status (only oncheckafk.lines
)%duration%
is replaced with minutes and seconds the player has been inactive for (only oncheckafk.lines
)
Permissions
From plugin.yml:
#!yaml permissions: advancedafk.*: description: Allows to use all AdvancedAFK features. default: false children: advancedafk.commands.*: true advancedafk.bypass.*: true advancedafk.allow-text-formatting: true advancedafk.commands.*: description: Allows to use all AdvancedAFK commands. default: op children: advancedafk.commands.afk: true advancedafk.commands.afk.others: true advancedafk.commands.checkafk: true advancedafk.commands.main: true advancedafk.bypass.*: description: Allows to bypass all AdvancedAFK restrictions. default: false children: advancedafk.bypass.exempt.auto: true advancedafk.bypass.exempt.teleport: true advancedafk.bypass.exempt.kick: true advancedafk.bypass.protection.move: true advancedafk.bypass.protection.damage: true advancedafk.bypass.anti-spam.cooldown: true advancedafk.commands.afk: description: Allows the usage of /afk command. default: true advancedafk.commands.afk.others: description: Allows the usage of /afk <player> command. default: op advancedafk.commands.checkafk: description: Allows the usage of /checkafk command. default: op advancedafk.commands.reload: description: Allows the usage of /advancedafk command. default: op advancedafk.bypass.exempt.auto: description: Doesn't put you automatically to AFK mode. default: false advancedafk.bypass.exempt.teleport: description: Doesn't teleport you automatically for AFK. default: op advancedafk.bypass.exempt.kick: description: Doesn't kick you automatically for AFK. default: op advancedafk.bypass.protection.moving: description: Doesn't protect you from moving. default: false advancedafk.bypass.protection.damage: description: Doesn't protect you from damage. default: false advancedafk.bypass.anti-spam.cooldown: description: Doesn't prevent you from spamming the /afk command. default: op advancedafk.allow-text-formatting: description: Parses text formatting codes in player messages. default: op
#!yaml advancedafk.preset.<name>: description: Overrides default AFK, teleport and kick delays with the ones in the preset. default: false
Updated