LuckPerms Extensions
When using LuckPerms with Cobblemon NPCs, you can use the following Molang extensions to check for player permissions:
Player Functions
Section titled “Player Functions”- Functionq.player.luckperms()
Returns the player's UUID for use with the LuckPerms functions.
Returns{ "playerUUID": "string" } - Functionq.player.luckperms.promote(<track string>, <dont-add-to-first int-as-boolean>)
Promotes the player on a specific track, optionally not adding them to the first group in the track.
Returns0 - Functionq.player.luckperms.demote(<track string>, <dont-remove-from-first int-as-boolean>)
Demotes the player on a specific track, optionally not removing them from the first group in the track.
Returns0 - Functionq.player.luckperms.permission_set(<track string>, <dont-remove-from-first int-as-boolean>)
Sets a permission node for the player, optionally not removing them from the first group in the track.
Returns0 - Functionq.player.luckperms.permission_unset(<node string>)
Unsets a permission node for the player.
Returns0 - Functionq.player.luckperms.permission_settemp(<node string>, <value boolean>, <duration string>)
Sets a temporary permission node for the player with a specific duration.
Returns0 - Functionq.player.luckperms.permission_unsettemp(<node string>)
Unsets a temporary permission node for the player.
Returns0 - Functionq.player.luckperms.permission_check(<node string>)
Checks if the player has a specific permission node.
ReturnsBoolean-As-Double - Functionq.player.luckperms.parent_set(<group string>)
Sets the player's parent group to a specific group.
Returns0 - Functionq.player.luckperms.parent_add(<group string>)
Adds a parent group to the player.
Returns0 - Functionq.player.luckperms.parent_remove(<group string>)
Removes a parent group from the player.
Returns0 - Functionq.player.luckperms.parent_settrack(<track string>, <group string>)
Sets the player's parent group for a specific track.
Returns0 - Functionq.player.luckperms.parent_addtemp(<group string>, <duration string>)
Adds a temporary parent group to the player with a specific duration.
Returns0 - Functionq.player.luckperms.parent_removetemp(<group string>)
Removes a temporary parent group from the player.
Returns0 - Functionq.player.luckperms.meta_set(<key string>, <value string>)
Sets a metadata key-value pair for the player.
Returns0 - Functionq.player.luckperms.meta_unset(<key string>)
Unsets a metadata key for the player.
Returns0 - Functionq.player.luckperms.meta_settemp(<key string>, <value string>, <duration string>)
Sets a temporary metadata key-value pair for the player with a specific duration.
Returns0 - Functionq.player.luckperms.meta_unsettemp(<key string>)
Unsets a temporary metadata key for the player.
Returns0 - Functionq.player.luckperms.meta_get(<key string>)
Gets the value of a metadata key for the player.
Returnsstring