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)
BTW: if you get an NPE while loading...
remove INVENTORY_OPEN from listened_events
well I hope I will have time to bring my ideas in... it is on my todo..
ideas atm are:
No Mob targeting Special Effect when afk god mode
otherwise that's it
I think it keeps falsely kicking people. Here is my config:
kick-message=Kicked for idling. block-idle-items=false timeout-check-interval=30 exempt-players=name1,name2,name3 kick-broadcast=kicked for idling. use-faux-sleep=true use-jump-ignoring=false ignore-vehicle-movement=false listened-events= player-count-threshold=0 kick-idlers=true kick-timeout=600
1.1 compatibility issue was reported by Joy in this ticket. Sorry it took so long to update, RL has been keeping me busy. Please test the update (link in ticket, or it will be approved by Bukkit staff soon).
Regarding new ideas, this plugin is currently in maintenance only. If you have new ideas, the code is open source so you are welcome to clone the source, add your ideas and send me a gitpull to include in the plugin. Alternately, @Donredhorse had some ideas for this plugin as well so he might consider implementing new ideas to share.
As for me, I'll do my best to keep it updated with the latest Bukkit versions, but don't expect much beyond that for now.
Update coming soon? :3
@andune
I have some sweet ideas for this plugin. I posted them in the ticket section. Go have a look please :D
@FireZtreaM
Hmm. It is PLAYER_INTERACT and PLAYER_INTERACT_ENTITY. I'll update the documentation here.
[ALLVARLIG] [AfkBooter] Invalid listened-events setting, "PLAYER_ENTITY_INTERACT" please verify that it is correct.
Seems to be a problem with that one. Or have i done something wrong?
@Joymo
Good to see you still around, Joy. Hope Buxville is still going strong for ya. :)
I run AfkBooter and haven't seen that error myself, but I'll keep an eye out and see if I can catch it in action. Can you pastebin your config so I can see if there are any differences that might account for the error?
ps. I assume it was working fine prior to MC 1.1? Which Bukkit dev build # are you using?
Getting this error since MC 1.1:
2012-01-13 21:46:15 [SEVERE] [AfkBooter] Failed to kick idle players. Passed timeout (60 sec) after found idlers.
It never kicks AFK people either...
@quickclay
correct, leaving it blank means you don't have any events to monitor player activity, therefore the plugin won't be able to perform it's function. Here's an example:
The full list of possible options is right here on the plugin description page.
@cky2250
Can you define "as soon as"? The (original, unmodified) code includes a hook for PLAYER_JOIN and as soon as the player joins, they get an "activity update". This means they should not be kicked until at least "kick-timeout" seconds after they login. Also, sharing your settings file (pastebin please) will help confirm there are no configuration errors causing this problem.
I had the same problem. Any chance this will be fixed?
I had autokick on and people where geting kicked as soon as they came back. Only way it would stop is removing the jar file.
omigosh. Did I miss that "Download" link before?? o.O
time to get my eyes checked. Sheesh.
What will the default "blank" listened events do? Does this mean nothing will be checked to deterine idleness? How should a correctly filled out listened events field look? (commas between each, etc)
Just click download link in the upper right. This plugin is not in the works, it's a very mature codebase by the original author. Only thing I've added is a performance improvement and bug fix.
Am I missing the download link? Are we supposed to pull it from the old forum? (I know this is still 'in the works' but I'd like to give it a try).
@predawnia
predawnia: this plugin pre-dates superperms. I'll add support for it in a future release, but any perms plugin worth it's salt will have a Perm2 compatibility layer which will get you going for now.