EssentialsX

EssentialsX

2M Downloads

EssentialsChat {DISPLAYNAME} placeholder contains prefix/username/suffix. {USERNAME} option?

ZerekZarson opened this issue · 1 comments

commented

Feature request

EssentialsChat format placeholder {USERNAME}

Feature description
EssentialsChat format currently has these placeholders:

mFormat = mFormat.replace("{DISPLAYNAME}", "%1$s");
mFormat = mFormat.replace("{MESSAGE}", "%2$s");
mFormat = mFormat.replace("{GROUP}", "{0}");
mFormat = mFormat.replace("{WORLD}", "{1}");
mFormat = mFormat.replace("{WORLDNAME}", "{1}");
mFormat = mFormat.replace("{SHORTWORLDNAME}", "{2}");
mFormat = mFormat.replace("{TEAMPREFIX}", "{3}");
mFormat = mFormat.replace("{TEAMSUFFIX}", "{4}");
mFormat = mFormat.replace("{TEAMNAME}", "{5}"); 
mFormat = mFormat.replace("{PREFIX}", "{6}");
mFormat = mFormat.replace("{SUFFIX}", "{7}");

{DISPLAYNAME} is a placeholder which contains Prefix-Username-Suffix

EssentialsX (main jar) seems to have placeholders for {PLAYER} and {USERNAME}
{USERNAME} being just the username alone and;
{PLAYER} being the displayname as described in #comments throught the main jar portion of the config.yml:

# You can set a custom join message here, set to "none" to disable.
# You may use color codes, use {USERNAME} the player's name or {PLAYER} for the player's displayname.
custom-join-message: "&3▪ &b{USERNAME} Connected"

While youre in this mind zone, might also be good to change the main jar's placeholder "{PLAYER}" to "{DISPLAYNAME}" for consistency or alternately switch EssentialsChat's placeholder "{DISPLAYNAME}" to "{PLAYER}"

How the feature is useful
Better control on formatting chat + Consistency throughout EssentialsX
The {PREFIX} and {SUFFIX} placeholders are essentially redundant when used along with {DISPLAYNAME}.
Using {DISPLAYNAME} alone does not allow for coloring prefixes and suffixes separate from the username.

commented

A {USERNAME} placeholder for EssentialsXChat has been added and is present in EssentialsX versions 2.17.1.17 and above.