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

Get a meta value for a specific group. #39

Open
DooSHeK2 opened this issue Nov 14, 2022 · 2 comments
Open

Get a meta value for a specific group. #39

DooSHeK2 opened this issue Nov 14, 2022 · 2 comments

Comments

@DooSHeK2
Copy link

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

@Evidentsinger14
Copy link

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.

@DooSHeK2
Copy link
Author

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

@lucko lucko transferred this issue from LuckPerms/LuckPerms Nov 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants