Essentials AFK

Discussion in 'Spigot Plugin Help' started by Benz56, May 24, 2016.

  1. Benz56

    Moderator Supporter

    Hi there!

    Is there any way to change the essentials /afk command message into a player message.
    The chat was getting spammed with people entering and leaving AFK so i completely removed the message in the essentials language file.

    I tried setting this up in commands.yml:
    afk:
    - afk
    - afktoggle <-- A custom message from another plugin.

    Yet that did not work (probably because it creates some kind of loop)

    Any suggestions??
     
  2. Just simply negate the permissions from them? I have no other suggestions on what you're trying to do...?
     
  3. Benz56

    Moderator Supporter

    I am giving some people permission to use the command.
    Why would I negate it then..? I see no point at all in doing so.
     
  4. The way essentials coded it, you cannot change that feature, unless u decompile the plugin and recode it to the way you want it
     
    • Informative Informative x 1
  5. The whole point of the command is to announce when players aren't there. You're annoyed because its announcing it too much, maybe you shouldn't let players use it.

    Unless I missed the whole point of the command.
     
  6. You should try using a plugin that puts cooldown on chats, not sure if doing a command is part of the cooldown though. To be pretty specific, find a plugin that puts cooldown on a certain command.
     
  7. I believe you can add command cooldowns via essentials anyway...? or is that teleport cooldowns?
     
  8. Pretty sure that's teleport cooldown.
     
  9. Benz56

    Moderator Supporter

    I really don't need all those suggestions.
    All I am asking is for a plugin that will run a command saying "* AFK toggled" only for that player alongside the normal essentials /afk command.

    So when a player type /afk this will happen:
    - Essentials will set the player as AFK (I removed the essentials afk message in the locale file so it won't broadcast to other players longer)
    - Another plugin will see that the player ran the /afk command and print "* AFK toggled" - only for that player and not broadcasted.

    Hope somebody knows a plugin that can do that, or can create one!
     
  10. Oh, I see. I've never heard a plugin like that. Maybe you could request on the Plugin Development section.

    Edit: If I find one, I would surely update you.
     
  11. Benz56

    Moderator Supporter

    Thank you very much Citoxe.
    Definitely appreciate all the help I can get!
     
  12. Benz56

    Moderator Supporter

    I am already using DeluxeCommands. The problem is that it overwrites the essentials /afk command and only runs the message command. Sadly it does not work.
     
  13. use essentials customtext to make a custom message then make an alias in the bukkit commands.yml to do /afk and the customtext message
     
  14. @MadCraft's suggestion may work. If not, you can use BetterAlias. It's pretty basic, allows messages, commands, syntaxes, timers, etc..It is worth it! Aliases is in the name, so it will work. It can also have a priority over other plugins so the command or source will get overrided by BetterAlias if set. :)
     
  15. cowgod

    Supporter

    I would recommend updating to EssentialsX where this feature is built in. It's a drop in replacement for Essentials, no extra config necessary. By default it will not broadcast an AFK message, but players can use /afk <message> to specifically say why they are going AFK, when they will be back, etc.

    https://github.com/drtshock/Essentials/wiki

    From their documentation:

    AFK message
    This feature was added in build 380 (9dfa650d). Requested in #590. PR in #664.

    Players can now set their AFK message when using the /afk command to notify others of their situation. This helps give insight on how long the player will be back so that other inquiring players can be informed and act appropriately.

    Players are informed with the AFK message by default when they /msg a player who is AFK. However, when a player goes AFK with a message, by default the message will not be broadcast. However, this can be changed in the locale file by modifying userIsAwayWithMessage and using the{1} argument, the message.

    To set the AFK message simply type /afk <message...> e.g. /afk I'm walking my dog.

    In order to use this feature a player must have the essentials.afk.message permission.

    If a player is muted, they are not able to supply a message as it can be used to exploit their punishment.
     
  16. I would recommened that you will code the command "/afktoggle"
     
  17. EssentialsX doesn't stop the message by default i use it and it always says the afk message