Placeholder for LuckPerms permissions with contexts
A placeholder that allows you to check if a group or player has a permission with contexts, it is also possible to check the current contexts of the permission.
The usual LuckPerms placeholders do not allow you to check permission with specific contexts. With this placeholder you can check for context specific permissions for both groups and players.
Format
Check presence of permission:
%CEP_lp_has_permission_in_contexts_<player|group>_<permission>_<contexts>% # Check if the permission has the specified contexts
<player | group> โ the group or player to check (it supports offline players and underscores in the names as well); (MANDATORY)
<permission> โ the permission to check; (MANDATORY)
<contexts> โ the contexts of the permission to check, the contexts are specified comma separated, first the context name, then its value with =, for example: server=test,world=nether. (MANDATORY)
Get contexts of permission:
%CEP_lp_get_permission_contexts_<player|group>_<permission>_(optional) <contexts>% # Get all or certain (if specified) contexts of a permission
<player | group> โ the group or player to check (it supports offline players and underscores in the names as well); (MANDATORY)
<permission> โ the permission to check; (MANDATORY)
<contexts> โ the contexts of the permission to get (you can skip it to get all contexts), the contexts are specified comma separated, and only the names of contexts, without their values, for example: server,world. (OPTIONAL)
Use "แต" symbol instead of underscores in <permission> and <contexts>!
Targets
LuckPerms groups;
Players.
Where is useful
For example, if you need to check if a player has a specified permission in certain contexts, or get contexts of a certain permission from a player.
Examples
%CEP_lp_has_permission_in_contexts_{player}_TestPermission_server=TestServer% # Check if the player has permission with the specified contexts
%CEP_lp_get_permission_contexts_{luckperms_primary_group_name}_TestPermission2% # Get all contexts of the specified permission from the group