Essentials: I Need A Little Help

Created on 23 Nov 2017  路  20Comments  路  Source: EssentialsX/Essentials

Hello,

I use EssentialsX (latest version) and LuckPerms (latest version). I was wondering if there was a way where I could make a player's name on the tablets appear white, but in the chat the player's name turns yellow, but it still keeps the prefix and everything else. (Kind of the way Mineplex uses their chat system).
I made an example using pictures
The first message is what I want to see on the tab-list,
and he second one of the one I want to see in chat.
https://imgur.com/aSQoE1S

Thanks
Techno

help wanted question

Most helpful comment

2781 was merged. So if Techno still cares, he can now do this.

All 20 comments

You can use EssentialsX Chat or another chat formatting plugin, and add a colour code between the prefix and name variables.

I鈥檓 asking how to do it with Essentials chat.

EssentialsX Chat currently doesn't support using Vault prefixes in the chat formatting string. However, if this is not an issue, you can change the chat format with the format option in the config to include the variables you need ({DISPLAYNAME}, {MESSAGE} etc.) and the colour formatting codes (eg. &e for yellow).

See the Chat Formatting page on the Essentials wiki for more information.

Edit: You can also use per-group formats as a substitute for Vault prefixes and suffixes, though if a player doesn't match any group then they will use the regular format from the format option. For example:

format: '&e{DISPLAYNAME}&r: {MESSAGE}'

group-formats: 
    admin: '&c&lADMIN &r&e{DISPLAYNAME}&r: {MESSAGE}'
    donator: '&6&lDONATOR &r&e{DISPLAYNAME}&r: {MESSAGE}'

However, I've proposed PR #1663, which will make it possible to specify prefixes through your permission plugin rather than through the EssentialsX config. With that PR, you can simply set prefixes with your permissions plugin and use a single format option instead of multiple group formats:

format: '{VAULTPREFIX}&r&e{DISPLAYNAME}&r{VAULTSUFFIX}&r: {MESSAGE}'

As said by @md678685 you will need to install a chat manager such as EssentialsChat. You will also need Vault. Please close this issue.

@wherkamp The user has already installed EssentialsXChat. It remains open as the PR that resolves this issue has not yet been merged.

As of recent versions of EssentialsX Chat, you can now use the placeholders {PREFIX} and {SUFFIX} in chat formats - make sure you disable add-prefix-suffix in the config.

I am sorry to bother you again @md678685 but actually this isn't working. While the chat is working how I would like it to, the tab-list does not work at all and stays white. Did I set this up correctly?

Config File: https://pastebin.com/3qNh0xja

Thanks
Techno

Could you paste your config on Gist?

Thanks for helping!
Here is the Config: https://gist.github.com/Techno3600/84341ae338002932444d18ba5a703c28
Here is the LuckPerms Owner File: https://gist.github.com/Techno3600/6dab4cee9d7338c9bbcc14035a3fc1bd

Thanks
Techno

@md678685, Do notifications not work on re-opened threads?

I'm not sure you can do what you're asking with EssentialsX alone, as that would involve both:

  • Having add-prefix-suffix: true to put the prefix and suffix in the displayname and therefore the tab list
  • Having add-prefix-suffix: false to be able to place colour codes between the prefix and displayname in the chat formats.

If anyone has a suggestion, I'll leave this issue open, but I can't see a way to do this with EssentialsX on its own (unless I've missed something).

I thought that since add-prefix-suffix: false is false, add-prefix-in-playerlist: true is true it would work. Because LuckPerms would add the prefix in the tablist and format: '{PREFIX}&r&e{DISPLAYNAME}&r&f {MESSAGE}' (in essentials config) would make the chat messages look like I envisioned (see first message)

Sorry is this is confusing, I'm having a hard time explaining my thoughts in writing.

Thanks
Techno

It appears that you need to set add-prefix-suffix: true, add-prefix-in-playerlist: true, change-displayname: true and change-playerlist: true, then add disablePrefix: true to your config (it's not normally present). That way, Essentials will process nicks normally, but only add prefixes to the playerlist name and not the actual display name - apologies for the confusion.

Looks correct - does it achieve what you intended?

Unfortunately not, this is what it does: https://imgur.com/gallery/7Es41

This is what I envision: https://pasteboard.co/HeEsb0H.png

For some reason, EssentialsX uses the old Essentials method, which always adds the prefix and suffix to the nickname unless it's being used in the playerlist as of 63b5cb9ec72a2d29df99fe0189d564dfc875212f. This means you can't currently control player list prefixes independently of display name prefixes.

We could add separate options like add-prefix-in-displayname and add-suffix-in-displayname to achieve this, though I don't know what the side effects of this would be.

Okay, it鈥檚 up to you guys!

Just made a suggestion earlier that would fix this issue md

https://github.com/EssentialsX/Essentials/issues/2602

2781 was merged. So if Techno still cares, he can now do this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Tomi010817 picture Tomi010817  路  3Comments

Sikatsu picture Sikatsu  路  3Comments

drtshock picture drtshock  路  3Comments

Castiella picture Castiella  路  3Comments

rjohnson98126 picture rjohnson98126  路  3Comments