AFK Message plugin

Discussion in 'Archived: Plugin Requests' started by PHLegacy, Dec 10, 2012.

  1. Offline

    PHLegacy

    I'm not entirely sure if this is available or not but I think it'd be a great plugin or addition to a plugin. Pretty much there's those AFK plugins out there and I have one on my server. It's great I enjoy it. But sometimes I wish I could leave a message for anyone who gets on after I step away from my computer.

    What it does?
    Basically the plugin is an automatic feature that after a certain amount of time it lets everyone know you've gone AFK (yes there are plugins out with this feature, but I'm not finished). As soon as your character goes AFK, a sign is placed in front of you (or around you) that has a preset message on it. Something that you typed out to let people know you are away from the keyboard for whatever reason. So for example: I am cooking something on the stove and I keep running back and forth to the kitchen. I can leave a message using whatever command saying something like "I'm cooking". This message will pop up on a sign as soon as the AFK message appears in the chat. So anytime someone is wondering where I'm at they can tp to me and read the sign.
    Another cool feature would be to add a time at which I have gone afk. So when someone sees the sign it says "AFK at 2:03pm which would be set to the user (not the afk user's) time zone.
    An easier way to possibly do this without the signs is to set a preset message that a user can type something like

    /where <user's_name>
    and the afk message would popup with something like (using our example)
    phlegacy is afk since %time%: I'm cooking

    That's sort of the set up for this. Below is some command ideas

    Commands:
    /where <user's_name>
    (reveals the afk message of the user and time they've been away)

    /afk set <titlename> <message>
    (sets the afk message for the sign and the chatbox--also allows for certain messages to be set depending on the user)

    /afk del <titlename>
    (removes the message that belongs to that certain title)

    /afk edit <titlename> <new_message>
    (allows for user to change a message based on the title)

    /afk
    (already in use--but basically puts the user in a state of begin away from keyboard)

    /afksign <true/false>
    (determines whether the player would like to set a sign in front of them or not--true = set the sign, false= do not set the sign)

    /afk god <true/false>
    (a feature that allows the user go into godmode when afk, whenever a player attempts to attack the afk user, the afk message appears and the afk user is not hurt).




    So there's a simple rundown of the plugin. I don't know if this is an available plugin already (i do know there's afk plugins because i use one) but it would be a cool plugin or addition to a plugin. Take up this plugin for anyone who wants it otherwise point me in the right direction! :D thanks!
     
  2. Offline

    Officialjake

    There is one obvious problem that I see with this idea right off the top of my head. Please correct me if im wrong but if a sign was placed with the time the user went AFK wouldn't that time be the "server" time? It would either be by means that I dont know yet or impossible to get the clients timezone to display the correct time to whatever user looks at the sign?
     
  3. Offline

    PHLegacy

    Good question. I actually have a plugin called Deathtpplus which when you die, all of your items are placed in a chest and two signs appear pretty much acting as tombstones. On the sign it gives the player's name, and the date and time that they died. I compared the time on the tombstone to my actual time and it is correct. Whether or not other players see the same thing is beyond me. I have a friend who lives in France that comes onto my server quite often. I'll have her check and see what time it says for her. For now, it is definitely possible to use the actual time as for based on timezone, i'll look into it.
     
  4. Offline

    Darq

    It would be more practical to put the duration they've been AFK for. As is stands, I can't think of many practical ways to show different sign text across multiple clients, any I'm not 100% on if it can even be done. However, you could run a Sync repeating task, to update a line on the sign that says "x minutes", where x is how long they've been AFK. Hope that assists whoever might want to pick up this request. :)
     
    PHLegacy likes this.
  5. Offline

    gomeow

    As for timezone, you would need to find their timezone (possible) and you would need to send packets to players to make them different for each player
     
    PHLegacy likes this.
  6. Offline

    PHLegacy

    I had thought about that too as a possible feature instead of the time. Good catch. I had forgot about it when writing. :)

    The other thing that I forgot to mention is that I don't need it ASAP. Just whenever it can be finished. It'd be a great addition to my server though. :) Just curious if anyone has picked this up yet?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
  7. Offline

    Officialjake

    I agree that it should instead have the duriation of how long they have been afk because if we were to manipulate the packets sent to each player based on their timezone (found by IP) when minecraft updates if Mojang changed something that could interfere with the way out plugin manipulates the packets we would have to deobsufcate the minecraft.jar again.. and figure what is wrong and how to fix it. To make the timezone concept work in the first place you would have to do this. But anytime Mojang changes something that interferes with how the plugin works it would break the plugin and the plugin would instead be changing other packets leading to unwanted changes.
     
  8. Offline

    PHLegacy

    That's fine. As long as the user has an idea of when the other user went afk. I also had my friend check the time on the signs when I'd die and it would show her my time. So obviously there is a timezone issue. Anyways, I could careless if it had the time on it or not. It was just an additional feature I thought would be a good option. I agree the duration of how long they've been afk would be better anyways. The reason why I didn't suggest it was because I wasn't sure if it was possible to update the signs.
     
  9. Offline

    gomeow

    That would be possible
     
  10. Offline

    PHLegacy

    alright awesome! You got this one?
     
  11. Offline

    gomeow

    No
     
    CeramicTitan likes this.
  12. Offline

    PHLegacy

    Oh haha okay. Well I guess it's still open to the public if anyone wants it.
     
  13. Have someone made a plugin like this? I would like to have it especially with the "/where" - command.
    I would love to develop something here on bukkit, I just need some guide in makeing plugins...
     
  14. Offline

    PHLegacy

    nope, no one has made this plugin. you're welcome to take this one on when you figure out how to develop plugins. but no one has notified me if there has been a plugin like this developed.
     
  15. Offline

    gomeow

    If you can use github, I could help you with this plugin.
     
  16. I will look into it, I can find it easy to understand things. I'm fast forward in Java tutorials right now...

    EDIT:
    My name on Github is AMinecraftplayer, and I understand how I use it now. But I may not know the name of everything but in that case I use to google for it.. ;)
     
  17. Offline

    Kevn1997

    I am trying to make this plugin but what are the permissions you want for each command ?
     
  18. Offline

    Borlea

    Maybe I can help? Shouldnt be the hardest thing in the world
     
    AMinecraftplayer likes this.
  19. I've done some research and I don't think so too complicated.
    But I would appreciate some help.
     
  20. Offline

    gomeow

    If you guys ^ are planning on adding the features in earlier posts, then this would be a very hard plugin to make. You would need to deal with packets, placement of the signs (what if the sign replaces a wall!) you would be dealing with ips and packets.
     
    1mpre55 likes this.
  21. No not all of them, I would be happy if I get the "where" command to work.
    So when you want to be AFK, you just write "/afk Eating" for example.
    Then when you login to the server you see in a list who's Online and which is AFK.
    We say you wan't to know where he or she is then we type:
    "/where <user_name>"
    And I'm thinking of a config file for the "god"- feature.
    More in the config file could be if you gets kicked or not after time and so.
     
  22. Offline

    Borlea

    From my thinking all we have to do is grab the players location if he is afk. But if the player isn't afk we can deny it with some kinda message.

    But if you wanna work on it either get github. And we can work on it that way. Or dropbox
     
  23. Offline

    PHLegacy

    Look on the main post. there's a list of commands there :)

    Yes that's the general idea. Some way of giving users/ members/ friends an idea of what you're up to when you're away. I definitely would like this plugin for my admin and mods so I know where they are if they're away and how long they'll be away for, as well as how long they've been away so I can get a general idea on when they'll be back on. I'm sure members could figure out a use for it themselves. But it would also be useful to other servers I'm sure :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
  24. Offline

    Borlea

    Got a name for this? Because that is needed for a request post.
     
  25. Offline

    PHLegacy

    Here's a few:

    AFKMsg
    AwayMsg
    WhereYouAt?


    Not really creative names but it's a start. If anyone has a better more creative name then submit it.
     
  26. I'm on Github now ny name is "AMinecraftplayer"



    I would go on something like AFKMsg.
    So for now I rename it to AFKMsg and it's found on Github.
     
    PHLegacy likes this.
  27. Offline

    PHLegacy

    [/quote]I would go on something like AFKMsg.
    So for now I rename it to AFKMsg and it's found on Github.[/quote]

    Sounds good to me! I just want to thank everyone who's working on this! I really appreciate it! :)
     
  28. Offline

    Borlea

    Now I need to remember how to use github.:eek:
     
    PHLegacy likes this.
  29. Offline

    Kevn1997

    Uh I've made a test version. See if any things aren't right. Download link [removed]. I've yet to make the permissions. If everything's alright then I shall start on the permissions.

    Basic commands :
    /AFK - Toggles your AFK status.
    /AFK help - Shows some commands.
    /AFK message delete - Deletes the custom message.
    /AFK message current - Shows what your custom message is.
    /AFK message set <message here> - Sets your custom message.
    /AFK god <true / false> - Shortcut to set god-mode instead of going into the config to change it.

    and of course most wanted :

    /AFK where <player> - Says if a player is AFK, if so, how long and the reason so.
     
  30. Offline

    3DDarren

    That plugin completely spammed my server console
     

Share This Page