JetsAntiAFKPro | Play Time + AFK Reward/Detection | ACTIONS | BUNGEE | REGIONS | GUI | [1.8 - 1.21] icon

JetsAntiAFKPro | Play Time + AFK Reward/Detection | ACTIONS | BUNGEE | REGIONS | GUI | [1.8 - 1.21] -----

An advanced AFK detection plugin with configurable actions! Also configure actions for playtime!



PayPal is currently disabled, while I work on this, For those who require support/to purchase the resource can do so on our Discord.

[​IMG]
JetsAntiAFKPro provides an incredibly efficient, yet powerful and advanced anti-afk and player-time plugin. Configure actions that are executed when players are AFK or reach play-time milestones!

JetsAntiAFKPro is extremely lightweight, yet cannot be bypassed using Minecraft mechanics (Will refund you if you find a Minecraft Mechanic bypass!)

[​IMG]
Come and join our official Discord Server!​

[​IMG]
  • Detects ALL AFK players effectively and efficiently
  • Region Support
  • Will detect Auto-Clicking and other macros that simply move the player character, water pools, anything with TNT, etc
  • Save and reward Player Time
  • Send players to other servers when they reach playtime / are afk
  • Configurable actions (Including the ability to execute Commands, Sounds, Titles and Messages or based of player permission) when a player is AFK or has played for a set amount of time
  • Sending an AFK player a message? Receive a warning messaging telling you the player is AFK
  • Repeat actions when users play for set amounts of time (I.E give them a reward every 10 minutes of playtime!)
  • Execute actions when players return from being AFK
  • Create a completely configurable GUI to show player time (see pictures below)
  • Store Player Time data via MySQL (Allowing you to sync player-time data across a Bungeecord) or SQLite
  • Plugin offloads tasks to other threads and does not listen on CPU heavy events (It will run like a feather on your machine)
  • Placeholder support
  • EXTREMELY lightweight, it works asynchronously and does not listen on any CPU heavy events (unlike other plugins)!
[​IMG]
[​IMG]
[​IMG]

[​IMG]
upload_2022-7-30_14-52-30.png

[​IMG]

General Permissions:
/jetsantiafkpro (alias /playtime) -
Shows player time (as a menu or in chat) -
jetsantiafkpro.menu
/afk -
Toggle whether you are AFK or not - jetsantiafkpro.player.afk
/jetsantiafkpro top - Shows the top 10 people with the highest playtime - jetsantiafkpro.players.top
/jetsantiafkpro about
- Shows information about the plugin

Admin Permissions:
/jetsantiafkpro reload -
Reloads the Action Nodes and Messages - jetsantiafkpro.admin.reload
/jetsantiafkpro playtime <user> - Shows that players playtime - jetsantiafkpro.admin.playtimeother
/jetsantiafkpro info <user> - Shows all stats about a player, afk time, session time and playtine - jetsantiafkpro.admin.info
/jetsantiafkpro set <user> 5d 3h 2m- sets a user their playtime - jetsantiafkpro.admin.setplaytime
/jetsantiafkpro add 5d 3h 2m <user> - adds time to a users playtime - jetsantiafkpro.admin.add

/playtime and /antiafkpro are alias's for these commands

If you want actions to only be executed for certain players with a permission, then you can do this! Simply use the Permission action in conjunction with others that you want to use!

[​IMG]
Drop into your /plugins/ directory and configure!

PlaceholderAPI is required

Code (Text):

Valid Placeholders:
%jetsantiafkpro_isafk_total% //Returns total AFK on the server
%jetsantiafkpro_timeplayed_years%  //Returns years the player has played
%jetsantiafkpro_timeplayed_months%  //Returns months the player has played
%jetsantiafkpro_timeplayed_days%  //Returns days the player has played
%jetsantiafkpro_timeplayed_hours% //Returns the hours the player has played, minus days
%jetsantiafkpro_timeplayed_minutes% //Returns minutes the player has played, minus hours/days
%jetsantiafkpro_timeplayed_seconds% //returns seconds the player has played, minus minutes/hours/days
%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
%jetsantiafkpro_timeplayed_seconds_unformatted% //returns total seconds played
%jetsantiafkpro_timeplayed_minutes_unformatted% //returns total minutes played
%jetsantiafkpro_timeplayed_hours_unformatted% //returns total hours played
%jetsantiafkpro_afk_seconds% //Returns the time the player has been AFK for
%jetsantiafkpro_afk_minutes% //Returns the minutes the player has been AFK for
%jetsantiafkpro_isafk% //Returns a placeholder configured in config.yml if the user is afk

You can also do %jetsantiafkpro_top_<number>_<restoftheplaceholderhere>% to get top players
and
%jetsantiafkpro_top_<number>_player_name% to get the player name of that position

 

[​IMG]
Code (Text):

#############################################
#                                           #
#               JetsAntiAFKPro              #
#             Created by Jet315             #
#                                           #
#############################################

# -- Plugin Settings --

#The prefix that is shown before the plugin
plugins_prefix: "&eAFK &7» "


# -- AFK Settings  --

#When a player is AFK, should we stop counting there playtime? (-1 to always count playtime, else specify the number of seconds for them to be AFK for before we stop counting playtime)
afk_stop_counting_playtime: -1

#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

#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

#Enable god mode for AFK players? (The 'seconds_until_afk' value is used as the number of seconds for enbling god mode, unless 'afk_stop_counting_playtime' is specified)
enable_afk_god_mode: false

#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

#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

#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: ""

#Any world names listed here, if a player is in it, the AFK actions wont be executed against, world name must match exactly
afk_exempt_worlds:
  - example_world

# -- Playtime Settings  --

#Whether you want to counting playtime if the player is in vanish
disable_playtime_in_vanish: false

#Whether you want players playtime to be stored
store_player_time: true

#If this is false, doing /afk (or alias) will display the player's time in chat
enable_player_time_gui: true

#Any world names listed here, if a player is in it, the playtime will not be added to the player, world name must match exactly
playtime_exempt_worlds:
  - example_world



# -- AFK Actions --
#These actions are executed if the players time (in seconds) is equal to the number below
#Action format:
#  ACTION|Value
#Possible Actions
#  COMMAND                Example: COMMAND|kick %PLAYER% don't afk...     *Executes a command and replaces %PLAYER% with the players name
#  TITLE                  Example: TITLE|Title Text;SubTitle Text         *Shows a title to the player and replaces %PLAYER% with the players name and ; to split title;subtitle - 1.8 MC Required TitleAPI
#  SOUND                  Example: SOUND|BLOCK_LADDER_HIT:volume:pitch    *NOTE YOU WILL NEED TO USE THE CORRECT SOUND NAME FOR YOUR MC VERSION
#  MESSAGE                Example: MESSAGE|Hey, %PLAYER%, wake up!        *Sends the message to a player, replace %PLAYER% with the players name - Other placeholders using PlaceholderAPI supported
#  SERVER                 Example: SERVER|lobby                           *Players will be sent to a server called 'lobby'
#  PERMISSION             Example: PERMISSION|antiafkpro.default          *Players will need the required permission, else the action will not continue
#  BYPASSPERMISSION       Example: BYPASSPERMISSION|antiafkpro.default    *Players with this permission will not be effected by the action
#  SLOTCOUNTGREATERTHAN   Example: SLOTCOUNTGREATERTHAN|30                *The action will only be executed if there is > 30 players on
#  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
#  INWORLD                Example: INWORLD|pvpworld                       *The action will only be executed if they are in the pvpworld
#  REGION                 Example: REGION|world-name:region-name          *The action will only be executed if they are in the corresponding world : region
#  BROADCAST              Example: BROADCAST|Hello all!                   *Broadcast a message to everyone on the server
#
# If you want to repeat an action, say every 10 minutes reward a player, simply add a % after the number (see  playtime as an example)
#MVdWPlaceholders Supported
#Hex colour codes supported
#
actions:
#
#Actions that are executed when the player is AFK
#
  afk:
    120: #120 seconds = 2 minutes
      -  "MESSAGE|&eAFK &7» &cYou have been AFK for two minutes, you will be kicked soon!"
      -  "TITLE|&6You have been ; &6AFK for two minutes"
    295:
      -  "TITLE|&6Anti AFK ; &bYou will be kicked in &c5 &bseconds"
    296:
      -  "TITLE|&6Anti AFK ; &bYou will be kicked in &c4 &bseconds"
    297:
      -  "TITLE|&6Anti AFK ; &bYou will be kicked in &c3 &bseconds"
    298:
      -  "TITLE|&6Anti AFK ; &bYou will be kicked in &c2 &bseconds"
    299:
      -  "TITLE|&6Anti AFK ; &bYou will be kicked in &c1 &bsecond"
    300: #300 seconds = 5 minutes
      -  "BYPASSPERMISSION|antiafkpro.admin" #If they have this permission, the action will not execute
      -  "COMMAND|kick %PLAYER% You have been kicked as you have been AFK for 5 minutes"
#
## Actions that are executed when the player plays for a certain time (store_player_time needs to be enabled for this)
#
  playtime:
    300: #300 seconds = 5 minutes
      -  "MESSAGE|&ePlayTime &7» &cYou have played for 5 Minutes! &6You have been rewarded with $100!"
      -  "COMMAND|eco give %PLAYER% 100"
    3600: #3600 seconds = 1 hour
      -  "MESSAGE|&ePlayTime &7» &cYou have played for 1 hour! &6You have been rewarded with $1000!"
      -  "COMMAND|eco give %PLAYER% 1000"
    86400: #86400 seconds = 1 day
      -  "MESSAGE|&ePlayTime &7» &cYou have played for 1 day - Wow, you really like this server! &6You have been rewarded with $10000!"
      -  "COMMAND|eco give %PLAYER% 10000"
    600%: # -- PUTTING A % AFTER A NUMBER MEANS IT WILL BE REPEATED EVERY X SECONDS
      -  "MESSAGE|&eAFK &7» &cYou have been rewarded with $100 for playing! "
      -  "COMMAND|eco give %PLAYER% 100"

#
## 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"

afk_ignore_opped_players: true #afk actions will not effect opped players

# -- 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: [] ### To enable this, delete the [] and uncomment the lines underneath
#  - "/message"
#  - "/m"
#  - "/msg"
#  - "/pm"
#  - "/w"
#  - "/whisper"


# -- Database properties --

#Either you may use SQLite or MySQL (Can use MySQL to enable a single cross-server database to store players time in)
#If you do not understand these settings, it's probably best not to change
#There is currently no way to transfer data from one properties solution to another (I.E changing properties types after setting up the plugin will cause player data to start over)
database:
  sqlite:
    use: true
    db: "data"
  mysql:
    use: false
    host: "localhost"
    user: "root"
    password: "pa55sw0rd"
    port: "3306"
    db: "antiafkpro"
    ssl: false
#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


## Other settings that shouldn't be modified, but you have the option to

#How often the plugin 'ticks' (counts playtime and checks whether a user is AFK) - This is all done Async so will NOT affect performance modifying this
#If you do change it, the actions above must be divisible by this number (There is no logical reason to modify this)
check_delay: 1
 
Code (Text):
#Items can be easily added!:
#Example:
#    item_name: - Can be called anything
#      type: STAINED_GLASS_PANE - Any Material, MUST be valid for your Minecraft Version
#      data: 15 #Not used for Minecraft version 1.13 +
#      name: " " - Can be called anything (and can contain placeholders)
#      slot: 2 - Can be in any slot
#      command_to_perform: "" - Can perform any command when clicked (%CLOSE% to close the menu) - forces user to execute the command
#      lore: - Can have any lore
#
#                            Possible plugin placeholders:
#                                 %TIME_PLAYED_DAYS% - Returns the number of days played by the player (integer)
#                                 %TIME_PLAYED_HOURS% - Returns the number of hours played by the player (integer 0-24)
#                                 %TIME_PLAYED_MINUTES% - Returns the number of minutes played by the player (integer 0-60)
#                                 %TIME_PLAYED_SECONDS% - Returns the number of seconds played by the player (integer 0-60)
#                                 %TIME_PLAYED_SECONDS_UNFORMATTED% - Returns the number of total seconds played by the user (integer)
#
#
#This is the GUI shown when a user does not have a house
playtime_gui:
  slots: 9 #Must be a multiple of 9
  gui_name: "&bTime Played Menu"
  items:
    close_item:
      type: NETHER_STAR
      data: 0
      name: '&c&lCLOSE'
      slot: 0 #Slot start at 0
      command_to_perform: "%CLOSE%" #%CLOSE% = close menu
      lore:
      - ' '
      - '&7Click to close'
      - '&7this GUI'
      - ' '
      - '&d&m-------------------'
    time_item:
      type: COMPASS
      data: 0
      name: '&a&lTime Played'
      slot: 8
      command_to_perform: "%CLOSE%"
      lore:
      - '&6You Have Played For:'
      - ' '
      - '&eDays: &b%TIME_PLAYED_DAYS%'
      - '&eHours: &b%TIME_PLAYED_HOURS%'
      - '&eMinutes: &b%TIME_PLAYED_MINUTES%'
      - '&eSeconds: &b%TIME_PLAYED_SECONDS%'
      - ' '
      - '&d&m-------------------'
Code (Text):
#Messages configuration value

no_permission: "&cYou do not have permission to this command!"

failed_to_load_stats: "&cAn issue has occured! Please try again later..."

#If you've disabled the GUI, then this message will be send went a player does /playtime (or alias)
# Possible plugin placeholders:
#               %TIME_PLAYED_DAYS% - Returns the number of days played by the player (integer)
#               %TIME_PLAYED_HOURS% - Returns the number of hours played by the player (integer 0-24)
#               %TIME_PLAYED_MINUTES% - Returns the number of minutes played by the player (integer 0-60)
#               %TIME_PLAYED_SECONDS% - Returns the number of seconds played by the player (integer 0-60)
#               %TIME_PLAYED_SECONDS_UNFORMATTED% - Returns the number of total seconds played by the user (integer)
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"
[​IMG]
I have implemented a basic API so you are able to get playertime / afk time if you wish. Code to implement:
Code (Text):

//I would suggest saving this to a field variable, so you don't have to keep keep calling the Bukkit API
JetsAntiAFKPro.getInstance().getAntiAFKProAPI();
(Just PM me if you want me to add something)
https://pastebin.com/Fmwm41BP
 


[​IMG]
Any problems, questions or suggestions send me a PM here, on Spigot - I'm pretty active :)

[​IMG]
By buying this plugin you agree to the following terms:
  • You will not chargeback - If you have a legit issue that I cannot fix then I’ll happily refund you
  • I cannot guarantee support indefinitely.
  • You may not redistribute or resell this plugin (You are welcome to modify it for your servers needs though)
  • Very basic metrics (Server version, plugin version and players online) is collected
  • I may refuse to give you support with or without any specific reason
  • If you have an issue with this plugin, please contact me before leaving a 1 or low star rating
  • I can update this terms of use at any time, without notification
Thanks!
Resource Information
Author:
----------
Total Downloads: 1,037
First Release: Dec 27, 2018
Last Update: Dec 1, 2024
Category: ---------------
All-Time Rating:
57 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings