[+] Adds persist to Placeholders, if they're reloaded for example
[+] Added a new properties in config.yml to exclude UUIDs from playtime top:
Code (Text):
#Users (UUIDs) that are excluded from playtime top. If a UUID is listed in here, they will not show in the /playtime top command
exclude_playtime_top_uuids:
- "afad027c-eb9a-4640-89cf-3866a41c6bc9"
[+] Support for Multi Line on the playtime other message
[+] Fixes a config bug
[+] Fixes a bug where a wrong player would be returned when certain AFK commands were being used
[+] Adds support for all versions from 1.8
[+] Added the ability for actions to be executed only when a user is in a certain world guard region. To add one of these actions, use the following format:
Code (Text):
# REGION Example: REGION|world-name:region-name *The action will only be executed if they are in the corresponding world : region
For example, you could kick AFK users out of mines - or places where they shouldn't be!
[+] Players will remain AFK when teleported (i.e teleporting someone to spawn after 5 minutes of being AFK will remain them as being AFK)
[+] Fixed logging issues with output
[+] Modified how AFK Detection works slightly to help improve detection quicker
[+] Added the ability to add a delay to the /afk command - Set the following variables (default is 5 seconds)
config.yml
Code (Text):
#The delay (in seconds) on being able to run the /afk command - The message the user receives is configurable in message.yml, set to -1 to disable
afk_command_delay: 5
messages.yml
Code (Text):
#The message the user gets if they run the /afk command too quickly
afk_delay_message: "%PREFIX%&cPlease wait before running this command again!"
[+] Added the ability to disable counting playtime if the players in vanish
config.yml
Code (Text):
#Whether you want to counting playtime if the player is in vanish
disable_playtime_in_vanish: false
[+] Cleaned up the config file to make more sense
[+] Fixed a bug allowing players to put items into the Playtime GUI
[+] Fixed an issue with the 'target_player_afk_messages' config options not working if the 'enable_afk_command' was not set to true
[+] Fixed issue with last update to do with blacklists not working for worlds
[+] Fixed an issue with disabled worlds not working as intended
[+] The volume and pitch is now configurable for the SOUND action
Code (Text):
# SOUND Example: SOUND|BLOCK_LADDER_HIT:volume:pitch *NOTE YOU WILL NEED TO USE THE CORRECT SOUND NAME FOR YOUR MC VERSION
[+] Fix issues with the disabled world option in config.yml not working
[+] Added the ability to configure the amount of time needed for a player to be classed as afk (rather than hard coded 2 minutes) - To modify this, add the following to
config.yml
Code (Text):
#How many seconds until the plugin should deem a player is 'afk' - used for things like the is_afk placeholder
#Set to -1 for the player to never be deemed as afk
seconds_until_afk: 120
[+] Added support for PLaceholderAPI in the Playtime GUI

[+] Added ability to modify the "target_player_must_be_online" message, to modify add to
messages.yml
Code (Text):
target_player_must_be_online: "%PREFIX%&cThe target player must be online!"
[+] Broadcast messages will now also show in the console
[+] Fixed plugin.yml issue
[+] Added ability to modify the "target_player_must_be_online" message, to modify add to
messages.yml
Code (Text):
target_player_must_be_online: "%PREFIX%&cThe target player must be online!"
[+] Broadcast messages will now also show in the console
[+] The config option playtime_exempt_worlds will now no longer count playtime for the users in that world
[+] Fixed a bug where people could put items into the top Playtime inventory
[+] fixed plugin.yml error
[+] The config option playtime_exempt_worlds will now no longer count playtime for the users in that world
[+] Fixed a bug where people could put items into the top Playtime inventory
[+] The config option playtime_exempt_worlds will now no longer count playtime for the users in that world
[+] Fixed a bug where people could put items into the top Playtime inventory
[+] Added placeholder %jetsantiafkpro_afk_minutes% - Returns minutes the player has been afk for
@amarcais53
[+] The playtime_message messages.yml option can now be multiline:
Code (Text):
playtime_message:
- "&aYou have played for:"
- "&e%TIME_PLAYED_DAYS% &aDays, &e%TIME_PLAYED_HOURS% &aHours, &e%TIME_PLAYED_MINUTES% &aMinutes and"
- "&e%TIME_PLAYED_SECONDS%&a seconds"
[+] Fixed an issue with the broadcast action not broadcasting to all players
[+] Fixed an incompatibly issue with LiberyBans and a few other plugins, Thanks
@A248 for help
[+] TitleAPI no longer needed for 1.8 titles
[+] Fixed an incompatibly issue with LiberyBans and a few other plugins, Thanks
@A248 for help
[+] When sending an AFK player a message, you can now warn the sender that the target player is AFK
Example:
To Configure this, add this to
config.yml
Code (Text):
# -- Message options --
#When a player tries sending a message to a target player, if the target player is AFK, would you like warn the sender the target player is AFK?
#Configure the message sent to the player under 'target_player_is_afk' in messages.yml
target_player_afk_messages:
- "/message"
- "/m"
- "/msg"
- "/pm"
- "/w"
- "/whisper"
And this to
messages.yml
Code (Text):
#The message sent when a player sends a message to a player who is deemed AFK
# Possible plugin placeholders:
# %TARGET_PLAYER% - The player who has gone afk
target_player_is_afk: "%PREFIX%&7The player &a%TARGET_PLAYER%&7 is currently AFK, so may not see your message!"
[+] See last update + Added Maven change, thanks A248 for help
[+] Fixed an issue with the /antiafkpro reload command causing AFK actions to be duplicated when a player attains the action
[+] The add/set playtime commands now take arguments in human readable fashion rather than seconds, commands are:
/playtime add 1d 5h 2m 3s <player>
/playtime set <player> 1d 5h 2m 3s
@KayaLambrechts
[+] Updated to work on 1.19
[+] Added support for Hex Colour Codes
[+] Removed Guice, plugin will now run on all versions between 1.8 - 1.18.2
[+] Added the ability to execute various commands, when a player is back from being AFK
To add, please add this under the 'actions:' in config.yml - Be mindful of the indentation required
Code (Text):
#
## Actions that are executed when a player has returned from being AFK after X time
#
return_from_afk:
120: #120 seconds = 2 minutes - If a player has been AFK for more than 120 seconds, this action will be executed when the player gets back
- "MESSAGE|&eAFK &7» &cWelcome Back!"
- "TITLE|&6You have returned ; &6from being AFK"
See the image under for a demo of how it's added to config.yml
![[IMG]](/proxy/image?url=https%3A%2F%2Fi.ibb.co%2FTqMHPKK%2Fimage.png)
[+] Added the ability to set AFK players to have god mode, in order to enable this add this to config.yml
Code (Text):
#Would you like to give players god mode, so they cannot take damage, if a player goes afk (Default is 120 seconds, unless 'afk_stop_counting_playtime' is specified)
enable_afk_god_mode: false
[+] Can now use the PAPI placeholder to get up to the top 100 people playtime
@KayaLambrechts
[+] Added a /playtime add <seconds> <player> command, in order to add playtime to a player
[+] Added the placeholder %jetsantiafkpro_isafk_total% to return the amount of people AFK on the server
[+]
@AddstarMC You can now change the output of the /antiakfpro info <player> command
To configure, add into messages.yml
Code (Text):
playtime_info:
- "&aJetsAntiAFKPro INFO for player &d %TARGET%"
- "&bThis player has played for: &d%TIME_PLAYED_DAYS% day(s), %TIME_PLAYED_HOURS% hour(s), %TIME_PLAYED_MINUTES% minutes and %TIME_PLAYED_SECONDS% second(s)"
- "&bThis player has an active session for: &d%TIME_PLAYED_DAYS_CURRENT% day(s), %TIME_PLAYED_HOURS_CURRENT% hour(s), %TIME_PLAYED_MINUTES_CURRENT% minutes and %TIME_PLAYED_SECONDS_CURRENT% second(s)"
- "&bThis player has been AFK for: &d %TARGET_AFK_TIME% second(s)"
[+] Added command completion for all commands / sub commands - Based on User Permissions and whether they can access said command
[+] Added support for 1.17, this version will only work on MC 1.17 or if you are running Java 16 - Future update I plan to fix this
[+] Compiled on Java 16, plugin will now run on java 11 and 16
[+] You can now use
%TOP_PLAYER_<number>% - Returns the name of the player with the top playtime of the position specified (between 1 and 10)
in the playtimegui
[+] Fixed a bug that meant %PREFIX% in messages was not being changed to the prefix of the plugin, meaning players doing the command /playtime without the correct permission got a messaged that looked weird
[+] Added the following ACTIONS that can be used in config.yml, suggested by
@HydraByte
Code (Text):
# SLOTCOUNTERLESSTHAN Example: SLOTCOUNTERLESSTHAN|30 *The action will only be executed if there is < 30 players on
# PLAYTIMEGREATERTHAN Example: PLAYTIMEGREATERTHAN|500 *The action will only be executed if the player has played for more than 500 seconds
# PLAYTIMELESSTHAN Example: PLAYTIMELESSTHAN|500 *The action will only be executed if the player has played for less than 500 seconds
[+] Fixed an issue that prevented MySQL working last update
[+] Added the command:
/playtime info <player> - jetsantiafkpro.admin.info
This is a command intended for admins, to tell how long a player has been AFK for, session time, and time played
[+] Fixed an issue that caused the /playtime other command not to work if placeholder api was installed
[+] Placeholders will now apply to the /playtime command
@SrBedRock
[+] Added the ability to use placeholderapi in the message command
@SrBedRock sorry for the delay
[+] See last update, fixed a small bug in 1.8 throwing an error
[+] Added the BROADCAST action type, to broadcast a message to a server:
Code (Text):
# BROADCAST Example: BROADCAST|Hello all! *Broadcast a message to everyone on the server
[+] Added very basic metrics, see main page for more info
[+] Added a /playtime top command - permission is
jetsantiafkpro.players.top
To modify the messages sent, add these to your messages.yml file
Code (Text):
#Top 10 playtime command
unable_to_load_data: "&cThe top 10 playtimes cannot be loaded at this time. Please try again soon!"
top_10_data: "&c#%NUMBER% &6%NAME% &ahas played for &6%DAYS% day(s), %HOURS% hour(s) and %MINUTES% minute(s)!"
[+] Added the ability to use Placeholders from other plugins in the config.yml, for MESSAGE actions
@SrBedRock
[+] The permission to user /antiafkpro reload is now actually the one on the spigot page, instead of a random one
[+] Fixed plugin not loading on 1.8 with default config without Titleapi
[+] You can now enable/disable the /afk command, by adding this to config.yml:
Code (Text):
#Would you like to enable the /afk command? This will override essentials - Requires server restart to take effect if you change this value
enable_afk_command: true
[+] Added the ability to get a players session time using the API
[+] Added the ability to use the following placeholders, to get the session time of a player (the time he/she has been on since logging onto the server)
Code (Text):
%jetsantiafkpro_session_timeplayed_days% //Returns session days the player has played
%jetsantiafkpro_session_timeplayed_hours% //Returns the session hours the player has played, minus days
%jetsantiafkpro_session_timeplayed_minutes% //Returns session minutes the player has played, minus hours/days
%jetsantiafkpro_session_timeplayed_seconds% //returns session seconds the player has played, minus minutes/hours/days
This plugin doesn't see as many updates as it used to - This is because I am not too sure what people want me to add, so if you have any feature requests send me a discord message or a message on Spigot
[+] The placeholder %TIME_AFK_SECONDS% can be used in the playtime_other message in messages.yml, to get the seconds a user has been afk for
[+] Latest placeholder api replaces %PLAYER% with %player% in a String causing my plugin to not format the %PLAYER% placeholder correctly
[+] Support for 1.14 + Materials in timedplayedgui.yml
[+] Fixed a NPE on startup when store playertime was set to false
@Haeiven
[+] Added placeholders to get months of a user playtime, and years of a user playtime - see main page for the placeholders
@hammad_alhassan
[+] When trying to request a placeholder for a player which his/her data isn't loaded yet, placeholders will now return a 0
@xolt
[+] Added support for 1.16, few changes
[+] Fixed a NPE that was caused when a player joined the server ty for helping fix
@AngellitoX
[+] Added an option to set the placeholder when a player is not AFK
@Elguerrero
If you are using the placeholder %jetsantiafkpro_isafk% and wish to configure the message given when the player is not afk, add this to
config.yml
Code (Text):
#The papi placeholder %jetsantiafkpro_isafk% will return the following text if they are considered afk (by default, 2 minutes, or when the variable afk_stop_counting_playtime above is hit), or the non_afk_placeholder if they are not afk
#This is good for Tab Lists plugins
afk_placeholder: "&4[&cAFK&4]"
non_afk_placeholder: "" //ADD THIS LINE
[+] Added a placeholder, %jetsantiafkpro_isafk%, that can be configured in config.yml and will return a value if the player is AFK.
To add, add this to your
config.yml
Code (Text):
#The papi placeholder %jetsantiafkpro_isafk% will return the following text if they are considered afk (by default, 2 minutes, or when the variable afk_stop_counting_playtime above is hit), or blank if they are not afk
#This is good for Tab Lists plugins
afk_placeholder: "&4[&cAFK&4]"
[+] Fixed a sql error that was showing in chat time to time
@EliteGhosts
[+] Fixed an issue with console log spam if the store playertime option was false
[+] Fixed a few issues with placeholders being incorrect
[+] Fixed bug with plugin not working correctly due to being renamed to jetsantiafkpro
This update will break your current configuration, to fix,
please rename the AntiAFKPro folder to
JetsAntiAFKPro
[+] Rebranded plugin to JetsAntiAFKPro (along will all permissions have changed)
[+] Added placeholders to view the player who has played the most - Will add commands and other things soon to view players with the most playtime
You can now do the following placeholders:
Code (Text):
%jetsantiafkpro_top_<number>_player_name% //returns the player name for the player in that top possition
%jetsantiafkpro_top_<number>_timeplayed_days%
%jetsantiafkpro_top_<number>_timeplayed_hours%
%jetsantiafkpro_top_<number>_timeplayed_minutes%
%jetsantiafkpro_top_<number>_timeplayed_seconds%
%jetsantiafkpro_top_<number>_timeplayed_seconds_unformatted%
%jetsantiafkpro_top_<number>_timeplayed_minutes_unformatted%
%jetsantiafkpro_top_<number>_timeplayed_hours_unformatted%
Example,
The player %jetsantiafkpro_top_1_player_name% has played the most on this server, with a total of %jetsantiafkpro_top_1_timeplayed_hours_unformatted% hours played! What a mad guy!
Thanks to
@Hosom for a big database to test with
[+] added placeholders
@Xolt
Code (Text):
%timeplayed_minutes_unformatted%
%timeplayed_hours_unformatted%
[+] Fixed a NPE that could sometimes trigger when a player joins
@RobZen
[+] Title actions will now fail to load gracefully if you are using 1.8 and do not have TitleAPI installed (instead of spamming tons of errors and not working)
[+] Fixed/Added %PREFIX% placeholder in messages in messages.yml
[+] Fixed bugs / incorrect values in the /afk about command
[+] Added an auto-save interval, so you are able to periodically update the database to prevent loss of data if the server crashses, to implement add this to your config.yml
Code (Text):
#Auto-save interval - Would you like to save data to the database periodically to prevent loss of data if the server crashes?
#By default, data is saved when a player logs out or when the server is stopped
#Number of seconds you would like to save data to the database, -1 to disable (suggested 300 if you want to enable this)
auto_save_seconds: -1
@CM_lectric
[+] Added new INWORLD action, so the user must be in a certain world for the other actions to be executed
@Hosom
Code (Text):
# INWORLD Example: INWORLD|pvpworld *The action will only be executed if they are in the pvpworld
#Example:
actions:
#
#Actions that are executed when the player is AFK
#
afk:
120:
- "MESSAGE|&eAFK &7» &cYou are in the PVP world, get out before you die!"
- "INWORLD|pvpworld"
[+] Support for 1.15 (and fixed titles for 1.15)
[+] Plugin should no longer fail to load if PlaceholderAPI is not installed
[+] Fixed 1.8 titles not working
@Swilt_
[+] Added new placeholder %antiafkpro_timeplayed_seconds_unformatted%
@CM_lectric
There hasn't been an update for a while - I'm looking for ideas to add, so if you have any, pm me them
[+] Modified how player player join/leave listeners work, to prevent a possible bug if a player was kicked during the join/leave process
[+]
@Hosom New SLOTCOUNTGREATERTHAN action can be used, and will mean the action will only execute if there is more than the specified players online.. Example:
Code (Text):
afk:
300: #300 seconds = 5 minutes
- "SLOTCOUNTGREATERTHAN|30 #If there are less than 30 people online, action will not execute
- "COMMAND|kick %PLAYER% You have been kicked as you have been AFK for 5 minutes"
[+] When setting the value 'should_player_be_afk_if_speaks' to true in config.yml, a plugin reload would not enable it (it required a restart) now a plugin reload will work
[+] Changed around placeholders slightly to ensure it does not throw any errors when requesting a placeholder using papiplaceholders
[+] Changed order of events slightly, which could have caused issues in certain circumstances
[+] Fixed an issue that meant if placeholderapi was not installed, the plugin did not work. Also fixed an issue that prevented placeholders from working in general.
[+] Fixed an issue with inventory items being clickable and could be taken out the inventory
[+] Not sure if there was a compile issue with the last version, but this version works fine for me

[+] If a players time cannot be queried from the database (for whatever reason) the players time would be set to 0 and then (if the plugin is then able to connect to the database) would override the old database value.. Therefor now if the plugin fails to get a playtime value for a particular player, the plugin wont try and save this value and possibly override the players playtime.
[+]
@Choubatsu Fixed an issue if PlaceHolderAPI was not installed, plugin would fail to load
[+] Added a new ActionNode: BYPASSPERMISSION - This will allow you to set a permission meaning if players have that permission, the action will not be performed on them:
Example:
Code (Text):
afk:
300: #300 seconds = 5 minutes
- "BYPASSPERMISSION|antiafkpro.admin" #If they have this permission, the action will not execute - so they will not be kicked
- "COMMAND|kick %PLAYER% You have been kicked as you have been AFK for 5 minutes"
[+] Added a config option so that if a player speaks, it will reset their AFK time. If you want to configure this option, add this to your config.yml
Code (Text):
#If a player types/speaks, would you like this to reset the players AFK time to 0 (So speaking means players are not considered AFK)
should_player_be_afk_if_speaks: false #false = If a player speaks, they will still be considered AFK if they do not move
[+] If the counting-playertime option was disabled, the plugin would not work correctly. This is now fixed
@HexedHero
[+] The papi placeholder {antiafkpro_afk_seconds} - that shows how long a player has been afk for was returning an incorrect value
[+] No longer need to do /playtime playtime <player> to find players playtime, can just do /playtime <player>
@Choubatsu
[+] A needed dependency for MySQL was removed in spigot 1.13, so this patch just fixes this.
[+] Added /playtime set <player> <playtime> to set someones playtime manually
[+] Fixed titles for 1.14

[+] Using PlaceholderAPI instead of MvdwPlaceholderAPI as more users have PlaceholderAPI
PLEASE ADD THIS TO YOUR CONFIG.YML
Code (Text):
#Any world names listed here, if a player is in it, the AFK actions wont be executed against
afk_exempt_worlds:
- example_world
#Any world names listed here, if a player is in it, the playtime actions wont be executed against
playtime_exempt_worlds:
- example_world
[+] You can now exempt AFK actions / playtime actions per world
[+] Fixed an issue when trying to view another players player time in console or in-game
[+] Bug fix for 1.14 support
[+] Fixed issue with crashing
[+] Jar was not being compiled with MySQL API, now it is. (Fixed MySQL not working)
PLEASE ADD THIS TO config.yml !
Code (Text):
#Do you want to stop the player getting playtime, if the player is AFK? if so, how long should the player be AFK for before it stops counting playtime?
#set to -1 to disable
afk_stop_counting_playtime: -1
[+] You can now stop counting playtime if the player goes afk for X amount of time
[+] If a server is shutoff, player data is now correctly saved. This should fix a few issues people are having.
[+] Possibly fixed an issue that I can't replicate, to do with data not saving correctly when a player logs out
NOTE: Please add to your
messages.yml
Code (Text):
playtime_other: "&a%TARGET% has played for &e%TIME_PLAYED_DAYS% &aDays, &e%TIME_PLAYED_HOURS% &aHours, &e%TIME_PLAYED_MINUTES% &aMinutes and &e%TIME_PLAYED_SECONDS%&a seconds"
[+] Added /antiafkpro playtime <user>
[+] Fixed an issue caused my MySQL on startup
[+] Fixed bug preventing plugin from loading if MVdWplaceholders was not installed
[+] Ensured that MVdWplaceholders plugin is loaded before myn
[+] Added placeholders that you may use in other plugins:
Code (Text):
Valid Placeholders:
{antiafkpro_timeplayed_days} //Returns days the player has played
{antiafkpro_timeplayed_hours} //Returns the hours the player has played, minus days
{antiafkpro_timeplayed_minutes} //Returns minutes the player has played, minus hours/days
{antiafkpro_timeplayed_seconds} //retruns seconds the player has played, minus minutes/hours/days
{antiafkpro_afk_seconds} //Returns the time the player has been AFK for
Hey all, I've been spending a while setting up a discord due to popular request, feel free to come and say hello
https://discord.gg/brdqwMz
[+] You can now use MVdWPlaceholders in actions

ADD THIS TO YOUR config.yml
Code (Text):
afk_ignore_opped_players: true #afk actions will not effect opped players
[+] Config option to ignore opped players for the AFK actions
[+] 50% sale for a few more days
[+] Added a new action:
Code (Text):
# SERVER Example: SERVER|lobby *Players will be sent to a server called 'lobby'
example:
Code (Text):
afk:
300: #300 seconds = 5 minutes
- "SERVER|lobby"
@hassan7000
@Aneryan (Was a good idea

)
[+] Also added an about command
[+] A start to an API added, see main page or
this if your interested
[+] Reworded a few messages to Playtime rather than AFK if needed
[+] Plugin was showing an incorrect message on startup
[+] Fixed an issue with an inventory not updating playtime
[+] Fixed the reload command not doing a permission check
[+] Added the ability to repeat Actions every X amount of seconds.
So for example, you could reward players for playing every 10 minutes.
Happy New Year people

I have decided to do a short 50% sale.
[+] Fixed a bug where player time would not be rewarded if the player was not AFK
[+] Added the ability to reload the configuration file via a command
[+] Modified main command to be /AntiAFKPro
[+] /Playtime is now an alias
[+] Fixed a bug with placeholders