SimpleAFK
SimpleAFK - A simple to use AFK system with advanced features
Version: v0.9.1
Tested against CraftBukkit Release Build: 1.1-R4
SimpleAFK is a very basic AFK system, though higly configurable and with some nice features. Initially I created this Plugin for my own Server stonedCRAFT.de but when it got more features and I saw no other Plugin offering a similar feature set I'd though I'd also release it here.
Optional additional Plugins:
- Any plugin that utilizes the Display Name (to make the Display Name change take any effect). For example (and tested with):
- iChat
- motd v1.0
- WorldGuard for having different Auto AFK times for protected and unprotected regions
Features:
- Set yourself as AFK
- Check if other Players are AFK
- List all Players which are currently AFK
- AFK-Booter (kick AFK players after a specified time)
- Right-Click a player to check if he is currently AFK
- Automatically set Players as beeing AFK when they Idle for a certain (configurable) amount of time (Different AFK times for protected and unprotected regions using WorldGuard)
- Change players Display Name when beeing AFK (iChat or some similar Plugin needed)
- Automatic AFK-Disable on player movement
- Block pushing of Players which are currently AFK
- Make a player automatically send a chat-message when going AFK
- Make a player automatically send a chat-message when coming back from beeing AFK
- Automatically broadcast a message when a Player goes AFK
- Automatically broadcast a message when a Player is coming back from beeing AFK
- Highly configurable through Config file:
- Change any message displayed to or automatically sent by the users (Supporting Chat Colors and Multi-Line messages)
- Enable or disable the automatic chat-messages
- Enable or disable "Automatic AFK-Disable on player movement"
- Enable or disable Display Name change and edit the pattern how to change the Name
- Enable or disable "Automatic AFK on Idle" and set time used as treshhold as well as the default AFK Message to use for this feature
Plugin usage:
- /afk [message]
Set you as AFK ([message] parameter is optional, you can also be AFK without any message)
Change your current AFK message
Set you as back from beeing AFK (when [message] is empty and you are set AFK at the moment)
- /isafk [name]
Check if the player [name] is currently AFK
- /afklist
Lists all players which are currently AFK
Plugin setup:
Just copy the SimpleAFK.jar file into your Plugins folder. Upon first startup it will create a folder "SimpleAFK" containing the default config files (all messages in english) in which you can do all further configurations. The default config file is commented and should be pretty self-explanatory ;)
You like my plugins? Please consider donating a little bit. Thanks!
Only Admins with '*' could read the Broadcast Messages, no other Groups.
Is there any Permission.node?
Or a problem with Herochat 5 o Commandbook?
@callmejordy265 Yep I am working on it. Though I first need to update my TimeAndWeatherControl plugin, then I am going to continue working on getting v1.0 ready with some new features.
Hey!
Was wondering if you still had plans on implementing an AFK teleporter like we discussed a few weeks ago.
You're beyond awesome if you allow the option of disabling personal notification. Customization such as this and the text colors blow the other afk plugins away.
I really appreciate the good feedback. Listening to the players who use your plugin shows great character as a developer. Luckily these changes should be a cakewalk for the most part in your coding structure.
-Clinpachi
Great plugin, my only “issue” was what Clinpachi posted. So I look forward to the new option to remove the AfkOn/AfkOff
@Clinpachi
Ahh now I get what you mean. I am going to add an option to enable and disable the "personal notification" ;)
When i turn off "BroadcastOnAfk" it removes both the [SimpleAFK] message yes, but it also turns off the notification to everyone that you went afk.
I would like it to broadcast the AFK message to the server, but i do not want it to say "[SimpleAFK] You have gone AFK" for the player i his log. It's either both or neither.
I tried to do this with the config:
But instead of removing the message it just puts [SimpleAFK] without anything. Here is an image to support my problem:
It's working perfectly and customized to our liking... but that player message is a bit of a problem... true that it's only for the player and not the whole server... but turning that broadcast off disables it all.
Hopefully that clarifies and presents what i meant a little better.
Appreciate it -Clinpachi
EDIT: Also here is a thought... if the player message is set to blank as above.. maybe create a coding check where if its blank it disables the prefix so that no entry is placed. That would be equally sufficient if you don't want the prefix to be editable. Just a thought.
@Clinpachi
"Any plans to remove the prefix"? No not yet, though I may create an option for it in some upcoming release... I am going to think about it ;)
"Or an option to turn off the section"? Its allready there, its the "BroadcastOnAfk" and "BroadcastOnBack" options from the config.yml file. ("ChatOnAfk" and "ChatOnBack" makes the player send a chat message on going AFK or coming back; "BroadcastOnAfk" and "BroadcastOnBack" send a global broadcast - the messages with the [SimpleAFK] prefix - when he is going AFK or coming back)
Are there any plans to remove the prefix [SimpleAFK] before messages? Or an option to turn off the section: "# Player notification on Enable / Disable (sent to the player only)".
Really enjoy the plugin minus that annoyance, a way to customize or remove would be fantastic.
Thanks -Clinpachi
I just uploaded a Bugfix Version v0.9.1 which should get rid of some exceptions (though it needs to be "approved" first so it won't show up right now, but should within the next few hours - as soon as BukkitDev approved this version). Also I am now working on finishing v1.0. I hope to get it done by the next weekend, but can't promise it right now since theres still a lot of ToDo´s :) I'll keep you all updated here.
@lordcorrino Hmm I need to look into that a bit further... Thanks for reporting, I'll see what I can do about it.
@XnitemairX Looks like its somehow related to PermissionsEx, which is strange due to me also using PEX without any problems. Do your permissions work as they should?
@richboos Should be a pretty easy fix, I'll give it a go ;)
@deleted_7554077 Yes you need some Chat plugin that displays the changed name in the chat. There is for example iChat, or the ChatManager "extension" for PermissionsEx can do this too.
@deleted_7554077 Allready working on such a Permission, should be included in the upcoming v1.0
Can you please also add a exempt permission? So that I can exclude some groups from being kicked by the afk timer like headadmins and owners.
Thanks
Works quite well on CraftBukkit 1.2.3-R0.1 Build 2030
But do I need a extra plugin to change the name if AFK?
My config:
# --------------------------------------
# SimpleAFK v0.9 default config.yml file
# --------------------------------------
# General configuration help:
#
# - Localization files have to be named like 'language_<Localization>.yml'
# (replace <Localization> with something like de, en, fr, it, ...)
#
# - ALL time settings are in minutes!
# Localization / Language file to use
Localization: 'en'
# Set players back Online as soon as they move
OnlineOnMove: true
# Set players AFK when they are idle
AfkOnIdle: true
AfkTime: 0.15
# WorldGuard Support - Set a different AFK-Time for players in a protected region
WorldGuardSupport: true
AfkTimeProtectedRegions: 0.30
# Kick players after beeing AFK for too long
AutoKickAfk: true
AutoKickAfkTime: 0.25
# Send a broadcast message to all players when a player was kicked for beeing AFK too long
BroadcastOnAfkKick: true
# Block pushing of players who are currently AFK
BlockPushAfk: true
# Change the Display Name when going AFK
ChangeDisplayName: true
ChangeDisplayNamePattern: '%player &c[AFK]'
# Send a broadcast message and/or make the player send a chat message on going AFK
BroadcastOnAfk: true
ChatOnAfk: false
# Send a broadcast message and/or make the player send a chat message on coming back
BroadcastOnBack: true
ChatOnBack: false
Went AFK after 15 sec then typed something but my name was still same KJanar.
============================================================
Walking around the map the plugin keeps putting you into AFK mode and then puts back online since you are walking. How can I fix this?
Thanks
When anyone comes back from AFK they will lose their nickname that is given by the plugin Nick Namer. They have to re-log to get the nickname back. Is it possible to fix that? Or does the problem occur between NickNamer and some other plugin like PEX or HeroChat?
Thanks,
http://dev.bukkit.org/server-mods/nick-namer/ - for reference.
I keep getting this error in the console:
I'm not sure if this has been addressed - when a player is on a workbench or furnace - as in, has the crafting window open - they can idle as long as they want without being kicked. Is there a way to fix that, or a setting I missed or something?
Thanks for your time!
@mrdeadlock Do you see any error messages in your server.log file? The same error as SolomonGajda? Its working fine here using Bukkit 1.1-R4
@SolomonGajda Created a Ticket for you. Going to look into this as soon as possible, it just puzzles me a bit that its working fine here without any problems... Does it happen everytime someone gets kicked or just sometimes? And could you please post a list of all the plugins you are using, so I can crosscheck if its somehow related to some other plugin?
Great plug-in! I use it to keep people from camping on spawners and grinders waiting for easy kills while they're afk. I'm running v.0.9 with CB 1.1-R4 on an SMP server and everything works.
Only trouble is that I get the following console error message each time it kicks someone:
2012-02-22 08:05:46 [INFO] [33m[SimpleAFK] [37m[37mLilmatoran1012[31m was kicked for beeing AFK for too long![0m 2012-02-22 08:05:46 [SEVERE] java.util.ConcurrentModificationException 2012-02-22 08:05:46 [SEVERE] at java.util.HashMap$HashIterator.nextEntry(HashMap.java:806) 2012-02-22 08:05:46 [SEVERE] at java.util.HashMap$EntryIterator.next(HashMap.java:847) 2012-02-22 08:05:46 [SEVERE] at java.util.HashMap$EntryIterator.next(HashMap.java:845) 2012-02-22 08:05:46 [SEVERE] at de.stonedCRAFT.SimpleAFK.Schedulers.sAfkIdleScheduler.run(sAfkIdleScheduler.java:28) 2012-02-22 08:05:46 [SEVERE] at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34) 2012-02-22 08:05:46 [SEVERE] at java.lang.Thread.run(Thread.java:722)
I've since corrected the spelling ("being" instead of "beeing") and changed the messages to make it more in-world:
AfkMessageOnIdle: '&eEndermen notice that %player is AFK' AutoKickAfk: 'You were AFK for too long. Endermen overpowered and ejected you from the world.'
This addon won't kick players for me on the newest bukkit version and this addon. Everything else seems to work featureswise
@GameCharmer
The config files indeed changed almost completely with the new version, backwards compatibility is no longer given. Just let it regenerate the config ;)
@bassfader
Must be an outdated config file. I'll delete it so that it will regen on the next server restart. :)