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

Hook into LuckPerms to fix duplicate permission keying for better stack_permission_limits handling #542

Open
triesharder opened this issue Dec 31, 2023 · 1 comment
Labels
type: feature request This issue is about a new feature or request type: hook This issue relates to an internal plugin hook

Comments

@triesharder
Copy link

My setup

All players start with huskhomes.max_homes.10 and they can improve their account by doing many tasks.

The problem

There would be more than one in-game reward granting +1 home limit to the player;
LuckPerms will ignore duplicated permission nodes, so having two entries of huskhomes.max_homes.1 will not do the trick

My solution

Named bonuses! We define it the config.yml or in another file, your preference;
It would work as follows:

bonuses:
  eventOne:
    max_homes: 1
  eventTwo:
    max_homes: 5
  veryImportantTask:
    max_homes: 42069
    max_public_homes: 12

Then we grant the player huskhomes.bonuses.<eventName>:
So i would have more flexibility to plan player limits

Note

I just found out that doing
image
works as i need it working, but not very classy nor organizated.

I appreaciate this plugin very much, i want to thank you again for making possible to bulk delete from specific worlds!

@WiIIiam278
Copy link
Owner

I'd rather this be permission based, rather than config defined. Either way to solve the issue of duplicate nodes not stacking (the consequence of intended LuckPerms effective node calculation behaviour) would warrant hooking into LuckPerms (as would checking user groups directly, but I digress).

Effectively then, this request is for a LuckPerms hook.

@WiIIiam278 WiIIiam278 changed the title [Feature Request] Improve stack_permission_limits Hook into LuckPerms to fix duplicate permission keying for better stack_permission_limits handling Jan 14, 2024
@WiIIiam278 WiIIiam278 added type: feature request This issue is about a new feature or request type: hook This issue relates to an internal plugin hook labels Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request This issue is about a new feature or request type: hook This issue relates to an internal plugin hook
Projects
None yet
Development

No branches or pull requests

2 participants