Essentials icon indicating copy to clipboard operation
Essentials copied to clipboard

Option to display either username or display name in messages

Open ghost opened this issue 7 years ago • 3 comments

Hello,

Can u create in the new essentialsX update that not will been used the displayname for ' "displayname" has teleported to you'.

I use a prefix before the playername and that will be show before the playername in that messages.

For example: '[rookie] aeadnerr has teleported to you'

Can u set that to the playername and not to the displayname?

Best regards Thibaud

ghost avatar Jul 20 '17 18:07 ghost

All messages can be edited in messages.properties https://github.com/drtshock/Essentials/blob/2.x/Essentials/src/messages.properties

LaxWasHere avatar Jul 21 '17 16:07 LaxWasHere

I don't think that it would be particularly easy to implement any way of supporting both simultaneously, since the messages currently substitute whatever string is passed to the tl method. Since in most cases the display name is passed, we'd need to add a condition to every use of translated messages which substitutes in player names, which is quite a lot of places.

mdcfe avatar Jul 21 '17 16:07 mdcfe

Slight necro, but a realistic implementation of this could be to have a User#getMessagesName method which returns either the username or displayname of the user as set in the config to be used in tl calls.

mdcfe avatar Mar 08 '18 08:03 mdcfe