Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggest] Prefix Option #74

Closed
RedstoneFuture opened this issue Oct 5, 2024 · 0 comments
Closed

[Suggest] Prefix Option #74

RedstoneFuture opened this issue Oct 5, 2024 · 0 comments
Assignees

Comments

@RedstoneFuture
Copy link

RedstoneFuture commented Oct 5, 2024

Instead of entering the prefix manually in each message in the messages.yml, I suggest a setting in which you define the prefix once in the messages.yml. Then you can either send the prefix automatically before each message, as most plugins do. Or you can then address the prefix with an %prefix% placeholder.

Relevant message settings with support of prefix

In the standard configuration, not all messages have the prefix (here replaced with %prefix%). I have entered it in significantly more places (e.g. in the beginning of Player.AFK etc.). In other words, any message that is a stand-alone single message should support the placeholder if it is used:

[...]

Prefix: "&8[&6AFK&4+&8] "

#These are sent to all players when AFK starts and stops
Broadcast:
  Start: "%prefix% &s{PLAYER}&p is now AFK"
  #You may also add a {TIME} variable that will be replaced by how long the player was AFK
  Stop: "%prefix% &s{PLAYER}&p is no longer AFK"

#These messages are sent to the individual who's AFK status is changing
Self:
  Start: "%prefix% &sYou&p are now AFK"
  #You may also add a {TIME} variable that will be replaced by how long the player was AFK
  Stop: "%prefix% &sYou&p are no longer AFK"

Updater:
  NoUpdate: "&pThere is no update available"
  UpdateFound: "&pThere is an update available for AFKPlus"
  UpdateDownloading: "&pAn update was found and is being downloaded, it will be installed on the next server restart"

Reload: "&pConfig files have been reloaded, any errors will be printed to the console"

#These strings are used in the "/afkplus player name" commands
Player:
  AFK: "&s{PLAYER}&p has been AFK since &s{TIME}"
  NotAFK: "&s{PLAYER}&p is not AFK"
  NotOnline: "&s{PLAYER}&p is not currently online"
  Stats: "&pThey have spent &s{TIME}&p AFK in total"
  #The current permission assigned to this player will be appended to this string
  Permission: "&pPlayers permission: &s"
  #These two strings will only be shown if AggressiveAFKDetection is enabled
  Active: "&pThis player is not exhibiting suspicious behaviour according to aggressive AFK detection"
  Inactive: "&sThis player has been behaving in a way that MIGHT mean they are trying to avoid AFK detection, they have been marked as inactive"

#Sent when the player is AFK long enough for a warning to be sent
Warning: "%prefix% You will be kicked for AFK soon!"

[...]

Error:
  MustBePlayer: "&sYou must be player to do this!"
  PlayerNotFound: "&sPlayer not found"
  NotPermitted: "&sYou aren't permitted to do this"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants