[INACTIVE][ADMN] Afk-Kick v0.2 - kicking AFK players (166+)

Discussion in 'Inactive/Unsupported Plugins' started by Rena4ka, Jan 31, 2011.

  1. Afk-Kick — Kicking AFK players
    Build: 2

    Quick Links:
    To Do

    This plugin kicks players being AFK.

    All settings are in folder /plugins/AfkKick in file config.yml
    • kick-after — time in seconds after last action, when player will be kicked
    • kick-message — message that will be typed to player, when he is kicked
    • exception-list — list of players, won't be kicked by AFK-timeout ("Player1,Player2,Player3,...")
    kick-after is not accurate time. It can be actual about 30 seconds bigger, cause of plugin working method.

    Buil 2
    - Added exception list
    - Tried to fix bugs
    - Tried to increase performanse

    Build 1
    - First public build

    • Two exceptions — should be fixed
    To Do:
    • MySQL support for exception list, OR
    • Permissions support for exception list
    This plugin not very well tested, please report any bugs you found. If any error in plugin happens, it will stop working, not crashing the server!
    I'm tried to increase performance as much as I can, but it's not tested on big server yet.

    Download latest version.

    This plugin written special for greencubes.ru :cool:

    Like that? ...donate!

    Please report bugs! And give suggestions!
  2. Offline


  3. Offline


    You are the best!! I have so been needing one of these.
    I hate to ask this, as you have done so much, could you (if there isn't) add an exceptions list.

    I.E.: Who is ever is on the exception list (just a flat txt file would be good) doesn't get booted for afk.
    --- merged: Feb 1, 2011 2:09 PM ---
    I will so test this.
  4. Offline


    Works like a charm (using cb#163), thanks a lot for this plugin!

    It even AFK kicks when only one player is online. The old hmod plugin failed at that.
  5. Offline


    Firstly, Thank you for this.. It is great. However, I second Phanku's request. I have run into a small problem. It doesn't register you as active unless you literally click with the mouse. So if i am on chatting with a player it will boot me in the middle of my conversation. Maybe even a /bootafk command to enable and disable on the fly?
    Thanks in advance,
  6. hm, it shoud active you, when you're chatting. I'll add onCommand event, maybe it will help.

    exception list... yes, I'll add this.
  7. Offline


    After testing again, i realized that it was a different plugin that crashed my client. My issue is fixed. Thanks for such a great plugin!
  8. glad to know that)
  9. Offline


    yay! now I don't need to make this! and I shall see how this works >:)
  10. :O decompilers? in my bukkit? :O
  11. Sounds useful.


  12. Offline


    I have a suggestion for you, wasn't my idea but one of my server users mentioned it. How about a warning message saying you are about to get kicked for inactivity?

    I personally think this is a bad idea and if you do implement it please put in a toggle for it. However, out of respect for you and your plugin I did pass the idea along.

    It would also probably be a good idea to put in a time that the warning shows up.
  13. I think, there is no need in warning feature.

    Build 2 with exception list will be released tomorrow.
  14. Offline


    Exception in thread "Thread-3" java.lang.NullPointerException
            at org.bukkit.craftbukkit.CraftServer.getPlayer(CraftServer.java:87)
            at com.rena4ka.bukkit.afkkick.AfkKick.kickAfk(AfkKick.java:93)
            at com.rena4ka.bukkit.afkkick.AfkKickThread.run(AfkKickThread.java:17)
    this logg appears sometimes..

    p.s. its just a idea, but You could make your plugins associate with your Authorize plugin (mysql users database), so just adding new field 'kickResistance' or smth like that. You could start a revolution in this way, because i hate to use sqlLite or even worse - plain data files. imho, all user data from plugins should be stored in mysql database. easy to work with it, easy to combine, etc.. what i wanted to say - it would be nice if all plugins which uses any kind of authorization, user lists, user database would use mysql + your auth plugin..

    edit: the same idea for online users plugin, just add one more field 'online' and update it with Auth plugin when user comes online.. :)

    craftbukkit: 210
    plugin v.: Build: 1
    Server: Linux Debian 5.0
    MySQL version: 5.0.51a-24+lenny4
  15. i'll see, what I can do to fix that problem.

    I'll think about database...
  16. Offline


  17. Build 2 released, see first post to new content)
  18. Offline


    I am just going to post this here even though it is not relevant any more.

    I get this error every once in a while on a averagely popular hosted server.

    Exception in thread "Thread-5" java.util.ConcurrentModificationException
    at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
    at java.util.HashMap$KeyIterator.next(Unknown Source)
    at com.rena4ka.bukkit.afkkick.AfkKick.kickAfk(AfkKick.java:90)
    at com.rena4ka.bukkit.afkkick.AfkKickThread.run(AfkKickThread.java:17)

    The error above is from CB#166.

    I am upating to your new build while still using CB#166. I hope it will work.

    I have been testing your plugin but I am not sure if I have it right.

    In your configuration file I am assuming that the number after kick-after is in seconds?

    I have yet to see any one kicked for being afk to long.

    Does it send a message to the console?
    Can it announce it globally in chat?
  19. hm... really, i didn't tested build 2 yet, cause of lack of time...
  20. Offline


    No No, I think you misunderstood my previous message. That error happens on CB#166 while using build one.

    I have build two in place now and am testing it.
  21. Offline


    The download link is dead =(

    EDIT: my bad, it's working =)
  22. no, it's working well. maybe it was an temporrary error...
  23. Offline


    I am a little confused on this plugin.

    I was just talking to a user on my server and he told me he did indeed get kicked for being AFK but he had to turn on his AFK status first with the /afk command before it happened?

    It this how it works?
  24. it is other plugin 0_o there is no such command as /afk.

    For everyone: sorry, I can't update plugins now, cause of lack of time(
  25. Offline


    General has the /afk command in it.

    Can you hand me the source code? I can probably update it.
  26. if you think, people can use /afk and should'n be kicked, when they are in afk-mode... SO WHY DO YOU USING THAT MOD? 0_o

    No, I won't give you source codes.
  27. Offline


    It was not intended for people to have /afk. It was intended for them not to be afking (holding slots and eating up bandwidth) on my server.

    General (the mod) provides much more than just /afk and it is those commands (not /afk) I am after in using that plugin.

    I think people being inactive (PERIOD) should be kicked off my server regardless of /afk or not. I will go and attempt to deactivate the /afk command if that is what is needed to make your wonderful (albeit unpredictable) MOD to work.

    P.s.: Forgive me for trying to help YOU because you don't have the time to update your code.
  28. What the hell are you talking about? My nod just kicks user, being afk the time specified in config. No matter what status they have in other plugins.

    I won't forgive you, cause my code doesn't need an update. I typed message about update, cause I want to add some new features, not to fix something.
  29. Offline


    I lol'ed at that when my Mac automatically opened the jar. file and decompiled the code :) Silly mac.

    You mispelled "build 2"; sorry just felt like pointing out.

    Seems like an totally okay plugin, I know I shouldn't comment before I've tried it. But after reading your feedback and seen it on other servers (that I stalk on purpose to steal ideas from (thats a joke, I like to see what others have made and copy it to my own server(thats not stealing!))) ... I approve! :)

    PS: I'll be testing it out myself when I have time and I will return to give as much feedback as possible technically and subjective.
  30. I know, about java decompilling, but it's not fair) and when i post a source code, it automatically became open-source.

Share This Page