chiralpenguin / MatsuQueue

Fork of MatsuQueue specifically adapted and updated for Purity Vanilla.
https://www.purityvanilla.com
MIT License
8 stars 0 forks source link

Fix LuckPerms Integration #5

Closed chiralpenguin closed 4 years ago

chiralpenguin commented 4 years ago

Description

Currently, LuckPerms permissions will only work consistently if a player has or inherits a single queue permission node, the loop breaks as soon as a single permission node is found. This requires inherited nodes to be negated so only one queue permission node is resolved per group/player.

How it will work

Check the entire stream of permission nodes and sort the available queues by their priority, then add the player to the queue with the highest priority they have the permission node for.

chiralpenguin commented 4 years ago

Additional Bug

LuckPerms will load after MatsuQueue. In some server configurations, this will break MatsuQueue. Currently this branch https://github.com/nitricspace/MatsuQueue/tree/bugs/luckperms-depedancy?files=1 has a fix, although it will mean the plugin will not load at all if LuckPerms isn't used.

Need to find a more elegant solution, alongside the previous issue.

chiralpenguin commented 4 years ago

Dependency issue is fixed, as is the original problem.

Still need to implement a way to filter negated permission nodes. Steam the permission node set and filter out any nodes which have been negated.

chiralpenguin commented 4 years ago

Resolved with https://github.com/nitricspace/MatsuQueue/commit/a8eeed7fa450e68ef156b14a78077e62f9b90e72