LuckPerms/placeholders

Get a meta value for a specific group.

DooSHeK2 opened this issue · 2 comments

Description

Get a meta value for a specific group.

Proposed Behaviour

For example, I have groups called Admins, Moderators. In each group I have a meta entry: in admins: meta.color.&6 in moderators: meta.color.&4 I would like to use placeholder %luckperms_meta_color_fromspecificgroup% e.g. %luckperms_meta_color_fromAdmins%

I would like to store a color in one place so that I can use it in several places using a placeholder, e.g. in chat plugin, TAB plugin, scoreboard plugin, mycommand plugin. If I want to change the color, I won't have to change it in several places, but only in one.

In one place I would like to color Group name only in other I would like to color Group and nick name of the player that belongs to that group.

Extra Details

No response

What's your reasoning for wanting to pull from a specified group? meta is displayed based on group weight anyways, so if you want different colors for each group, you'd just set them how you usually would. if I'm understanding what you actually want to use this for (server color schemes, so you don't have to hard-code it) you can set in default, and use the appropriate meta placeholder for it.

If I do that (put colors in the default group) I won't be able to use them for coloring (e.g. nicks, ranks) based on group affiliation, e.g. in chat. If I put colors as a meta entry in a group (I do now) I can't use those colors in places where I don't have a group reference. For example, I have done so that when you type /ranks, a list of all available ranks is displayed in the chat. This can be done e.g. using EssentialsX and an .info.txt file. This command just displays the contents of the file and I have to manually retype all the colors in this file that I have already entered in LuckPerms in groups. Now I have 18 ranks and I would like to change a few colors, I will have to do it in many places and if I had a placeholder I would do it in one place (in a group) and the color would automatically change everywhere. Imagine how much work it will be when there are more ranks.

There is a placeholder:
%luckperms_meta% <meta key>
why not do:
%luckperms_meta% <meta key> <group name>

ranks