afkTerminator
AFK Machine = Are methods players use to defeat AFK detection to prevent being kicked or to gain rewards offered by some servers for time played. These "machines" fool the AFK detection by providing unattended, continual movement.
AFK Machine Detection
The plugin detects these types of AFK Machines:
- Mine Cart
- Flowing Water (circular)
- Flowing Water (falling)
- Continual jumping
- Piston Powered Jumping
- Piston Pushers
- Piston/Door Randomizer
- Creative Mode Fly Straight Up Forever
- Continual Fishing
- Saddled Pig ( with or without Carrot Stick )
- Saddled Pig with lead
- Horse
- Arrow Machine
- Continual Block Strike
- Vine Farm
- Water over Fence
AfkTerminator is able to detect the use of these machines and provides operators with several options in dealing with the offending players.
Penalties/Punishment
Penalties include:
- NOTHING (report only)
- LAVA - Cover the machine in flowing lava [VIDEO]
- TNT - Destroy the machine and surrounding area using TNT [VIDEO]
- KICK - Kick the player
- KILL - Kill the player
- COMMAND - Execute any operator configured command or commands. Default: 'ban [player]'
- SPAWNMOB - Spawn one or many mobs specified on player's location
One word of caution about using the TNT penalty option. As you can see in the video, this can be very destructive. I'm afraid that some players may take advantage of this in PVP or Factions servers, building an AFK machine simply for the destruction it can cause to surrounding buildings or bases. USE WITH CAUTION.
When penalty=COMMAND, multiple commands can be executed, and this is defined by separating commands in the config.yml with " /n ". For example:
(from config.yml)
# # If the punishment setting is "COMMAND", this is that command (or commands). # "[player]" will be replaced with't players name on execution # Multiple commands can be executed by separating commands with " /n ". All commands must be on a single line in this file. commandPenalty: 'ban [player] /n ontime remove [player]'
Admin/Moderator Notification of AFK Machines
When an AFK Machine is suspected and eventually detected, administrators can elect to be notified via a console message, receive MC mail, and/or logging of information in a log file.
Logfile
Information about detected AFK Machines will be found in the file /plugins/afkTerminator/AfkTerminator.log. There is no management of this file provided by the plugin, so it will grow continually. So server owners may want to delete this now and again, when the data contained has no more value.
In-game Message
Any player with the permission "afkTerminator.notify" will receive a message to their game client if they are online at the time of the detection. The language and content of this message is configurable and can be found in the afkTerminator/config.yml.
MineCraft Mail
Any player with the permission "afkTerminator.mailReceive" will receive an mail through any in-game mail system supported by the server. The message received is the same as seen in the in-game message (as described above), and hence is configurable.
AfkTerminator keeps track of the players with 'mailReceive' permission string through the use of a 'mail_list.yml' file found in the plugis/afkterminator folder. Each time a player joins the server and is found to have the permission, they will be added to this file along with the the time of the login.
Each time afkTerminator plugin is restarted (e.g. server reset), the file will be reviewed by the plugin an any player that has permission, but had not logged into the server for a configurable number of days will be removed from the mail list. This will keep the list from growing as admin/moderators turn over, and keep the system from sending messages to inactive players. If a player joins, that had the permission, but they no longer have the permission, they also will be removed from the list at that time. If a player is removed from list, still has permission, and later again joins the server, they will be re-added to the list.
The system command used to issue the mail to the players is also configurable, and is found in the config.yml. The default configuration is compatible with Essentials Mail.
Auto Login Blocker
The plugin will also prevent client hacks which try to "get around" an AFK kick by simply auto logging back into the server. This function will require a player to wait a configured amount of time before logging back into the sever after leaving for any reason. If there are multiple attempts the minimum time for a login is raised each time, and if the player exceeds a configured maximum number of failed attempts, an configured action (such as 'ban') can be taken by the afkTerminator.
If a player has the permission "afkTerminator.loginDelayExcluded", they will not be subject to this check.
Please see the pages for configuration, etc.
Permission(s)
afkTerminator.excluded
When a player has the "afkTerminator.excluded" permission string, they will not be subject to the afkTerminator punishment. Their use of afkMachines will still be recorded in the log and on console in order that there is a record, but instead of being punished, they will be set back to "no AFK Machine state" when an AFK Machine use is detected.
afkTerminator.loginDelayExculded
When a player has this permission they will not be subject to the minimum time for re-login after leaving the server.
afkTerminator.admin
When a player has this permission, the will be able to execute the command "afkt reload"
afkTerminator.notify
When a player has this permission, they will be notified with an in-game message (if they are online) when a player has been detected using an AFK Machine.
afkTerminator.mailReceive
Whan a player has this permission, they will be notified with a mail message when a player has been detected using an AFK Machine.
Vault.jar
The Vault plugin must be installed in your plugin directory if you want to use the afkTerminator permission strings
Installation
- Place AfkTerminator.jar in your plugin folder
- Place optional Vault.jar in your plguin folder if afkTerminator permission string is to be used.
- Restart your server / Reload Plugins
- Edit plugins/AfkTerminator/config.yml as needed
- Edit is not required, as defaults are set
- See insructions for config settings in the generated file or here
4. Restart your server / Reload Plugins if config.yml is modifed
That's it!
AFKTerminator can be integrated by other Plugin Developers!
The AFKTerminator has available an API so other AFK related plugins can take advantage of its detection capabilities, and use this information as part of that plugin's AFK algorithms. API instructions are found here.
Note from EDGE: The AFKTerminator was originally built for use with the OnTime plugin, but I thought there was a much larger need for this capability so I broke it out and made it slightly more powerful.
Change Log
For a complete change log, pleas see here
V3.0.8
Compiled/Tested with Spigot/Bukkit V1.9; Java8; Vault 1.5.6
Functional Enhancements
- Added 'water over fence' AFK machine detection (Ticket #67)
Fixes
- Fixed NPE seen on Projectile Machine detection (no ticket)
V3.0.7
Compiled/Tested with Spigot/Bukkit V1.9; Java8; Vault 1.5.6
Fixes
- Fixed issue (again) where new line "/n" token was not working on COMMAND penalty (no ticket)
- Fixed problem with '[VEHICLE]' variable in output, where previous data was not cleared out (no ticket)
V3.0.6
Compiled/Tested with Spigot/Bukkit V1.9; Java8; Vault 1.5.6
Fixes
- Fixed issue (really this time!) where offline players not receiving mail when enabled (Ticket #58/#61)
- Fixed issue where MOB arrow attack while player is AFK, may be falsely identified as "arrow damage" afk machine. (No ticket)
- Improved notes regarding proper syntax for using " /n " to specify multiple lines in command penalty (No Ticket)
Functional Enhancements
- Added '[vehicle]' to list of supported output variables in afkMachine detection messages to ops. This will specify the vehicle type used. (Ticket# 62)
V3.0.5
Compiled/Tested with Spigot/Bukkit V1.9; Java8; Vault 1.5.6
Fixes
- Fixed issue where offline players not receiving mail when enabled (Ticket #58)
- Fixed issue where some WATER based AFK machines were suspected by never detected (reported by user, but no ticket opened)
V3.0.4
Compiled/Tested with Spigot/Bukkit V1.9; Java8; Vault 1.5.6
- Recompiled v3.0.2 with Spigot 1.9 API, updated Java8, & latest Vault
Fixes
- Fixed NPE issue when attempting to send mail notifications (Ticket #58)
- Fixed issue where 'interaction' based AFK avoidance methods were not being detected (no ticket)
Functional Enhancements
- Will now detect some forms of farming machines
V3.0.3
Compiled/Tested with Spigot/Bukkit V1.9; Java8; Vault 1.5.6
- Recompiled v3.0.2 with Spigot 1.9 API, updated Java8, & latest Vault
V3.0.2
Compiled/Tested with Spigot/Bukkit V1.8.1; Java7; Vault 1.5.2
Fixes
- Fixed console errors seen when Vault, which is optional plugin, is not installed on the server (Ticket #45)
V3.0.1
Compiled/Tested with Spigot/Bukkit V1.8.1; Java7; Vault 1.5.2
Fixes
- Fixed issue with auto config upgrade when "worlds:" was not set to default '- all' in the config.yml. (Ticket #49)
V3.0.0
Compiled/Tested with Spigot/Bukkit V1.8.1; Java7; Vault 1.5.2
Functional Enhancements
- Made the plugin compatible with Spigot/Bukkit v1.8.1 and the use of UUIDs
- Added option to notify admin/moderators via mail when AFK Machines are detected. (Ticket #47)
- Made text displayed and sent in mail, upon AFK Machine detection, configurable (Ticket #47)
Fixes
- Fixed issue with 'interaction" detection enable/disable not working. (Ticket #48)
New Configuration
- mailNotifyEnable: Set to true, if players with correct permission should be sent mail upon detection of AFK Machines.
- afkDetectMsg: Configurable message displayed in-game, and mailed to players with correct permission upon detection of AFK Machines
- mailCommand: Configurable mail command to execute to send messages, when AFK Machines are detected
- mailListRemovalTime: Number of days a player with permission to receive mails can be absent before they are temporarily removed from the mail list.
New Commands
NONE
New Permissions
afkTerminator.mailReceive : If a player has this permission, they will receive a mail message when AFK Machines are detected
@dickwick
Hi,
I would have to make a code change with a new configuration to limit the number of times that the 'penalty" is issued. Right now it repeats until the player dies or the AFK Machine ceases to function. Not a big deal to add this, but would take a plugin update. Please open an enhancement ticket.
Ironically, afkTerminator does not track player AFK time so its a bigger change in order to add in a delay prior to an attempt to detect a machine, but not impossible. What other plugins do you have that manage player AFK time? I ask because my initial thought would be to build an interface to another plugin that does this tracking already.
Hello, I have your plugin a try to discourage afking players from cheating total online time. I wanted to spawn a mob nex to them when they afk.
Command I use is
Unfortunetly when player is AFKing on his afk machine, it fires that command multiple times and spawns way too much mobs nex to him. Log: http://pastie.org/pastes/8274284/text
Another thing. Can I somehow set maximum AFK time that is player allowed to? I would love to start punishing people like after 20-30minutes, not right away after few minutes in their afk machines.
@smugdragon
After changing the config.yml, did you restart your server, reload your plugins, or run the '/ afkt reload' command?
Are you an OP, and perhaps 'kick proof'?
I am using v.1.5.3 and everything seems to be installed correctly. I built an AFK water machine and it logs the user perfectly. However, when I changed the command from NONE to KICK, nothing happens. It still logs the events, but never kicks the player...any suggestions? Thanks for the hard work!
@mal67
I have posted an updated version of the plugin that fixes the issue. It will be available for download when approved by bukkit dev moderators, or you can find it here:
http://dev.bukkit.org/bukkit-plugins/afkterminator/files/13-afk-terminator-v1-5-3/
@rsod
Thanks for the report. This is a duplicate of the issue reported under ticket # 24. I will have a fixed version out later today.
buggy buggy buggy!
I'm getting the "Could not pass PlayerQuitEvent" on Spigot 1.6.2 with AFKTerminator 1.5.2. I submitted a ticket.
@mal67
There is a error in the version checking function. I am away from home on holiday, so I can't get a fix out until next week, but you can work around this by disabling the version check with a simple edit to the config.yml.
Sorry for the hassle.
hmm. this plugin is giving me the majorminor version error upon startup, plugin will not load. any way to fix? im running CB-1.6.2 R0.1 DEV
or is this just the java version error on my end (testing on computer not on server)
@Beaupedia
I need to add it to the description list, but it should already be handling horses. It will not show this in the log because V1.6 is not properly identifying when a player is on a horse. Please let me know if you think players are able to avoid AFK detection when on horseback somehow. And if so describe how. Thanks.
@ViscousSummer88
I'm aware of this issue and will work on it shortly, but I am away from home, so it's not possible to quickly get out a fix.
What you can try doing in the meantime is disable the autoUpateCheck, by modifying the config.yml:
the error is related to that function, and as you suspected is related to the fact you are running Spigot, which is why I dont see this on my Bukkit test environment.
Awesome work, as always. Please add horse with/without saddle.
Getting Errors, plugin not loading with Spigot #1033. Vault 1.2.25 and 1.2.26 http://pastebin.com/hbshUZpV
@dulceice
I don't know why bukkiedev moderators are taking so long for approval.
You will find it here in the mean time: http://dev.bukkit.org/bukkit-plugins/afkterminator/files/12-afk-terminator-v1-5-2/
Is v1.5.2 available for download yet? I see you have the changelog for it, and I really need to get that error dealt with, but the only download there is 1.5.1. D:
@saxons12
What type of server are you running? and what version?
Also, this has been reported already in Ticket #22. I think I know the problem and am working on a fix. I will have an update out later today.
Help! 1.6.2 error spams console: http://pastebin.com/zvenrJwp
@Edge209
Ok, ty. I use the Essentials AFK detection and wanted to know if I had to worry about any conflicts.
@TheBlackBeltPanda
No. Do not confuse this with a vanilla AFK detector, such as that found in Essentials or OnTime. This plugin assists those other plugins by stopping players trying to work around AFK detection.