Afkbooter
AfkBooter - Boot players who idle too much on your server. This is the original AfkBooter by @neromir, old thread can be found here. It is being posted here as approved by @neromir and will be maintained through future Bukkit versions here.
Features
- Prevent players from idling on your server beyond a given time limit.
- Allows you to set a list of player names who are immune to idle-kicking.
- Allows you to set a player count threshold below which nobody will be kicked.
- Allows you to set a custom kick message for both the kicked player to see and one that is broadcast to all players on the server when the player is kicked.
- Allows you to determine if player idling status should be merely announced rather than having idlers kicked. If set to true, it will be announced when players are no longer idling. The kick broadcast message is used to determine the text of the message announced when a player goes idle.
- Works with any number of people on the server (does not fail when there's only a single person on).
- Allows you to set a kick-check frequency. Rather than arbitrarily set a kick-check interval for you, it allows you to determine what is best for your server.
- Allows you to specify which events, out of a given set, should be listened to for purposes of activity checking.
- Allows you to specify if players should be counted as active while moving in a vehicle.
- Allows you to set whether idlers should be counted as "in bed" for checking if all players are in bed to move the server time forward to day.
- Allows you to set whether idlers should be blocked from picking up items.
- Integrated with Permissions 3.1.6. Should also work fine with Permissions 2.7.3.
To install
- Simply put the jar file in your plugins directory for CraftBukkit.
- On first run it will create a file called "afkbooter.properties" in the directory "plugins/AfkBooter" and populate it with the default settings.
- You should then stop your server, change the settings to match what you want, and re-run it.
Permissions
- afkbooter.exempt: Anyone that has the exempt node will not be kicked by the plugin. (Note that the exempt node is in addition to any names listed in the exempt-players list in the settings file.)
- afkbooter.config: Anyone that has the config node will have access to all the below-listed commands
Commands
- /afkbooter kickTimeout [number] - Changes the idle time (sec) allowed before players are kicked.
- /afkbooter kickMessage [message] - Changes the message a kicked player sees.
- /afkbooter kickBroadcast [message] - Changes the message broadcast to all players when someone is kicked.
- /afkbooter listExempt - List the players on the exempt list.
- /afkbooter addExempt [playerName] - Add a player to the exempt list.
- /afkbooter removeExempt [playerName] - Remove a player from the exempt list.
- /afkbooter playercount [number] - Set the threshold below which no players will be kicked.
- /afkbooter useJumpIgnore [true|false] - Set whether or not to use experimental jump ignoring code.
- /afkbooter kickIdlers [true|false] - Set whether or not idlers should be kicked or merely announced as idling.
- /afkbooter ignoreVehicles [true|false] - Set whether or not to ignore player movement while in vehicles.
- /afkbooter useFauxSleep [true|false] - Set whether or not to use faux sleep (afk players are considered in bed).
- /afkbooter blockIdleItems [true|false] - Set whether or not item pickup should be blocked for idlers.
- /afkbooter list - List players marked as AFK.
Configuration
A player can be considered active when the plugin catches one of the following events (depending on how you set it):
- Join
- Movement (looking around past a certain threshold, I believe 30 degrees, does count as movement)
- Chat/command
- Opening the inventory (simply holding the inventory open does not trigger this - only the actual open inventory action does)
- Block placement
- Block break
- Dropped item
- Player interacting with a block
- Player interacting with an entity
Event names which can be listed in the listened-events property:
- PLAYER_MOVE
- PLAYER_CHAT
- PLAYER_COMMAND_PREPROCESS (to detect commands as well as chat)
- PLAYER_DROP_ITEM
- BLOCK_PLACE
- BLOCK_BREAK
- PLAYER_INTERACT
- PLAYER_INTERACT_ENTITY
INVENTORY_OPEN(DO NOT USE)
@NyssaZ
Still working even in 1.6.4. And even in 1.7.2. Trust me.
still working in 1.6.2?
This plugin getting a update soon?
how do i do that put a comma or what?
@lst96
Include PLAYER_CHAT as well. This plugin has been around a long time and the Bukkit command/chat processing changed with the introduction of AsyncChatEvent a few months back by Mojang. So COMMAND_PREPROCESS no longer covers chatting. Fortunately chatting has it's own event type. :)
do i have the config wrong? i have timeout set to 600 and the listener set to PLAYER_COMMAND_PREPROCESS and im having few players get kicked like 30 seconds after they just said something, in the config section above it says this susposed to check for chat and commands, is it just checking for commands? cause the players kicked i dont believe used commands only chat.
glad you made it where it checks for stuff other than movement, players on my server made what they call "the afk machine" it circles you in water preventing you from going afk by movement with this i can set it still kick them for afk.
@fffizzz
Thanks for the error report. That is certainly a bizarre one. AfkBooter is specifically registering for BlockBreakEvent, but in your stack trace, Bukkit is somehow passing it a FurnaceExtractEvent. Seems like a Bukkit bug - it should not be possible.
However, I've modified the AfkBooter code to specifically check to make sure the event is BlockBreakEvent before moving on. If this Bukkit "crossed event wires" problem is systemic, however, this problem will crop up elsewhere.
New update will be released soon.
http://pastebin.com/FwzYPiEh
getting the above error in console.
"afkbooter.exempt" does not seem to work for me.
How do list the listened-events properly?
Also I think all of these should be added by default because I think many have the problem of kicking even if the player is active and they don't know what causes it.
You could make the config file less confusing... What about this ?
@andune
But its not working at all for me. It the server gives ma a "severe" error saying the plugin could not be loaded.
@ntrixter
It is not async-compatible yet I stopped using this as I got a larger server and haven't hit my server limits in a while, so it feel to the bottom of my "update list". I'll work on getting an update out soon, should an easy upgrade. I know there were a few outstanding issues some people were having, so now would be a good time to remind me of any issues that need fixing (i'll check open tickets).
However note this will work FINE with 1.3.1, it will just spew the "AuthorNagError" because it's using the SYNC chat event. If this is your last plugin spewing such error, then it's standing in the way of AsyncChat, since Bukkit will fall back to SYNC even if just one plugin is listening. If you have other plugins spewing the deprecated AuthorNag event, then it doesn't matter that this plugin is too.
Is this working with 1.3 yet?
Doesn't work with PermissionsEX. Players with permission still get kicked.
@AgentSnazz
You need to add listened events...
@AgentSnazz
Here too... It is all about the mob traps for me, I don't need to kick players for inactivity - just stopping mobs spawning if the player idles a configurable time. Ideal solution would be afk mode players not to activate mob-spawners or mob-spawning - but leave player online. If it could be implemented it would be great. If anyone knows a solution, feel free to pm.
Similar situation here, but we also like it to prevent people from afk-ing in mob traps.
Here's my config, testing with two players one with the exempt perm, the other without. The exemption works fine. The 30 second kick timer is just for testing, would normally use 90.
Just tested again, and if I start running and jumping all over the place, I'll still get kicked in 30 seconds.
Currently testing with Bukket Dev 2117 for MC 1.2.4
http://pastebin.com/sCMQEt6j
Edit: Just tested with only AfkBooter, PermissionsBukkit, and SuperPermsBridge installed, still happening.
@AgentSnazz
Not sure, still haven't tested it myself. I have some new server capacity thanks to the new performant Bukkit and haven't really hit limits to require AfkBooter yet. But I see it has a number of downloads from others and haven't heard any reports of it not working yet, so thinking it's more likely an issue with your setup. Pastebin your config.