Simple AFK
![]()
About
Working in 1.5.1
This plugin will monitor players when they are afk. It's pretty simple.
You can also configure it so that if they're afk for too long it will kick them.
You can also configure an "AFK" prefix for when they're afk.
This plugin was really just made for personal use on my server (IP: 2rb.fiscalleti.com), But i decided to make it public.
Just put the jar file in your plugins and you're set :)
You can configure everything in the config.
Config
The Config should look like this:
# You can use %PLAYERNAME% or %PLAYERDISP% # Wait times are based on a 20 TPS server tick rate Prefix: Enabled: true AfkPrefix: "&4[AFK]&f" Afk: Enabled: true Time: 60 # The time before the player becomes AFK in seconds NoLongerAfk: "%PLAYERDISP% is no longer AFK" IsAfk: "%PLAYERDISP% is AFK" Radius: 5 # How far they can move without being set to "Not Afk" Kick: Enabled: true Time: 60 # The amount of time AFTER the player has become AFK to to wait before kicking them in seconds KickReason: "%PLAYERDISP% was AFK for too long!"
Commands
- /afk [player] - Sets a player to afk. If you leave the "[player]" empty it will set your self to afk.
Permissions
- simpleafk.exempt - Makes the user exempt from being set to AFK
- simpleafk.afk.self - Allows a player to set themself to afk using /afk
- simpleafk.afk.other - Allows a player to set another player to afk using /afk [player]
Download
V0.8
Changelog -
- Fixed Concurrent modification exceptions.. Again
http://dev.bukkit.org/server-mods/simple-afk/files/6-simple-afk-v0-8/
V0.7
Changelog -
- Fixed Concurrent modification exceptions
http://dev.bukkit.org/server-mods/simple-afk/files/5-simple-afk-jar-v0-7/
V0.6
Changelog -
- Fixed AFK tag being left when plugin disabled
http://dev.bukkit.org/server-mods/simple-afk/files/4-simple-afk-jar-v0-6/
V0.5
Changelog -
- Fixed Thread Exception Errors
- Fixed simpleafk.exempt Permission
- Fixed players leaving by pressing "X" errors
- (Recompiled in jre6 instead of jre7 using craftbukkit 1.4.4)
http://dev.bukkit.org/server-mods/simple-afk/files/2-simple-afk-jar-v0-5/
V0.1
Changelog -
Source Code
https://github.com/thefiscster510/Simple-AFK
Thanks to PoopYou for getting me started with plugin coding!
-
View User Profile
-
Send Message
Posted Apr 7, 2014http://dev.bukkit.org/bukkit-plugins/afkplus/
-
View User Profile
-
Send Message
Posted Aug 20, 2013Players get kicked after 1.667 min, wether I configured 15 and later 1800 minutes/seconds.
-
View User Profile
-
Send Message
Posted Mar 13, 2013Seems like not working.
If i walk straight it sets me afk and then not afk over and over.
I did write an advanced version of an AFK system, named AdvancedAFK. You may take a look at it, if you want to update some code.
It has alot more features including AFKTerminator api for AFKMachine detection.
It has an API which lets plugins get if a player is afk.
And alot more configurations.
Have fun
-
View User Profile
-
Send Message
Posted Feb 15, 2013Why simple afk no got kicked?
-
View User Profile
-
Send Message
Posted Feb 3, 2013There is already a bug...
-
View User Profile
-
Send Message
Posted Feb 2, 2013I'm using SimpleAFK.jar V0.7 for CB 1.4.7-R1.0 and whenever someone does the command /afk nothing happens. There are no errors in the console and no messages in chat.
-
View User Profile
-
Send Message
Posted Jan 30, 2013My serveur crash when a player is kick !!
-
View User Profile
-
Send Message
Posted Jan 29, 2013There is some bugs on 1.4.7 already :/
I've set time to 90 sec
-
View User Profile
-
Send Message
Posted Jan 7, 2013Hey, on 1.4.6 I'm having trouble with players not un-afking if they move or type. I set the radius to 1, and it still has trouble. I had another AFK plugin that waited for a player to type or move their mouse, or use WASD, but it went inactive. I'd love to see this type of innovation put into this plugin as well :)
-
View User Profile
-
Send Message
Posted Dec 17, 2012@coldog22
If you're talking bout how long until it kicks players, it is in the bottom section of the config. Go back and look at it again.
-
View User Profile
-
Send Message
Posted Dec 11, 2012@coldog22
.. The what?
-
View User Profile
-
Send Message
Posted Dec 11, 2012You need to add a command where you can add a number (minutes) for how long you want the afk killer to delay. as of now it is extreemly short.
-
View User Profile
-
Send Message
Posted Nov 14, 2012@ray73864
Version 0.6 :3
-
View User Profile
-
Send Message
Posted Nov 14, 2012Also noticed an issue with turning the plugin on and off.
We have plugman installed for managing our plugins which allows us to load, unload, enable and disable a plugin (using all standard bukkit stuff), and if i unload or disable the plugin while people are afk, the AFK tag is never removed from them.
Would it be possible to get the onDisable set up so that when the plugin is unloaded/disabled, it does a cleanup of all AFK tags?
-
View User Profile
-
Send Message
Posted Nov 14, 2012@BobbySoSlo @ray73864 @gawelium Fixed all issues, See V0.5 (Recompiled in jre6 instead of jre7 using craftbukki 1.4.4)
-
View User Profile
-
Send Message
Posted Nov 14, 2012oh, forgot to mention, i have compiled this against the most recent beta build of Bukkit.
-
View User Profile
-
Send Message
Posted Nov 14, 2012I had issues where i couldn't /afk another person because i have the exempt permission set on me, so i've forked and made a pull request with my changes to the code, improved it a decent amount, some things i still have to improve, but all in all, it works nicer now.
I haven't fixed the below issue that i keep receiving on occasions yet though.
-
View User Profile
-
Send Message
Posted Nov 10, 2012getting some errors like the following on the console:
14:47:48 [INFO] pieterjoosten was AFK for too long!
14:47:48 [SEVERE] Exception in thread "pool-1-thread-265"
14:47:48 [SEVERE] org.apache.commons.lang.UnhandledException: Plugin Simple AFK v0.1 generated an exception while executing task 21
at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:839)
at java.util.HashMap$KeyIterator.next(HashMap.java:874)
at me.thefiscster510.betterafk.Afk.run(Afk.java:14)
at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:53)
at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
... 3 more
We are running the plugin in 1.4.2, i know it wasn't designed for that but some plugins work regardless, and for the most part, this one seems to work fine, it just has the odd issue.
-
View User Profile
-
Send Message
Posted Nov 10, 2012Hi ! I add the permission : simpleafk.exempt for admin group but i was kick ! Why please ?
-
View User Profile
-
Send Message
Posted Nov 10, 2012Hi, just wondering, what unit of time is the afk time in? (ie. the 60), is it minutes? ticks?