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)

Changelog

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of LaoTheLizard LaoTheLizard Dec 10, 2013 at 03:40 UTC - 0 likes

    @NyssaZ: Go

    Still working even in 1.6.4. And even in 1.7.2. Trust me.

  • Avatar of NyssaZ NyssaZ Aug 09, 2013 at 00:47 UTC - 0 likes

    still working in 1.6.2?

  • Avatar of lst96 lst96 Mar 23, 2013 at 18:03 UTC - 1 like

    This plugin getting a update soon?

    http://imageshack.us/a/img703/2029/bannertca.png
    IGN: xBlackPoison357x

  • Avatar of lst96 lst96 Jan 18, 2013 at 16:50 UTC - 0 likes

    how do i do that put a comma or what?

  • Avatar of andune andune Jan 18, 2013 at 16:42 UTC - 0 likes

    @lst96: Go

    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. :)

  • Avatar of lst96 lst96 Jan 18, 2013 at 16:02 UTC - 0 likes

    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.

    Last edited Jan 18, 2013 by lst96
  • Avatar of lst96 lst96 Jan 18, 2013 at 06:48 UTC - 0 likes

    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.

  • Avatar of andune andune Jan 04, 2013 at 06:53 UTC - 0 likes

    @fffizzz: Go

    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.

  • Avatar of fffizzz fffizzz Jan 02, 2013 at 21:24 UTC - 0 likes

    http://pastebin.com/FwzYPiEh

    getting the above error in console.

  • Avatar of Serilum Serilum Jan 02, 2013 at 16:40 UTC - 0 likes

    "afkbooter.exempt" does not seem to work for me.

    McCombat a hardcore server whereas the only rule is no hacked client.

Facts

Date created
Dec 18, 2011
Categories
Last update
Jan 04, 2013
Development stage
Release
License
GNU Lesser General Public License version 3 (LGPLv3)
Curse link
Afkbooter
Downloads
9,082
Recent files
  • R: v1.3.1 for CB 1.4.6-R0.3 Jan 04, 2013
  • R: v1.3 for CB 1.4.6-R0.2 Dec 30, 2012
  • R: v1.2 for CB 1.3.1-R1.0 Aug 18, 2012
  • B: v1.1_beta1 for CB 1.2.3-R0.2 Mar 16, 2012
  • R: v1.0.5 for CB 1.1-R3 Feb 02, 2012

Authors