EssentialsX

EssentialsX

2M Downloads

Option to send "player is afk" only to the /afk player

RoboMWM opened this issue · 11 comments

commented

Helps prevent spamming chat, but gives feedback to the player doing /afk

commented

Hi,
I guess you can't, or maybe the trick would be to add a function or class for this. The only option is to open the EssentialsX jar file, to edit messages_[your local].properties, and remove the line for the message. The issue will be that nobody will get the information, not even the players who's AFK-ing

Regards

commented

@md678685 would you recommend adding a config option or just a new messages key, which is default empty/null? Sounds like the latter would make sense.

commented

@RoboMWM The latter; I'd suggest that it either defaults to matching the existing one or saying something along the lines of "You are now AFK."

commented

Well by default I'd have it set to none since the public one broadcasts to everyone

commented

If the additional message was added to be sent only to the AFK player, wouldn't it make sense not to send the public one to the player who was marked AFK (unless, of course, no message was set for the new message key)?

commented

@Aurgelmir yes I'm aware, and that's what I do currently. I used to actually have it also run a command that tells the player to check their afk status with /seen but it seems a "recent" update has made it so that running /seen (or probably any other command at this point) removes you from being afk. I probably will be doing something in my plugin to tell the player of their afk status or make a PR - but will only do the latter if the team would accept such(?)

commented

I think adding an AFK message which is only sent to the AFK player could be a good way to solve this - if you didn't want anyone else to know, you could leave this message enabled and disable the public message.

commented

@RoboMWM I found how to fix this!
In case you didn't know, there's a /sudo command, that you can run when the player types /afk that will not make him un-AFK.
To do so, the command has to be: /sudo {PLAYER} seen {PLAYER}
I just tried, and it works.

The sudo command's description is the following: /sudo: �Make another user perform a command.�

commented

This would break original behavior though - think of those filing an issue report stating that the afk message isn't changing.

commented

Inform them that there has been a change? The messages should ideally be adjacent in the localisation file.

commented

This has been implemented in #2780 and is present in EssentialsX versions 2.17.2.56 and above.