Skip to main content

LuckPerms Contexts

Allows permissions/groups/prefixes/etc to be assigned easily based on certain DiscordSRV states.

More information about contexts can be found here: https://luckperms.net/wiki/Context

Available contexts:

  • discordsrv:linked - whether the player has linked a Discord account (true/false)
  • discordsrv:boosting - whether the player is boosting the Discord guild (true/false)
  • discordsrv:role - the role the user has in Discord
  • discordsrv:role_id - the role id the user has in Discord
  • discordsrv:server_id - whether the user is a member of the server with the given id (which the bot is also a part of)
Is a user fulfilling the LP context in /lp user <user> info but not actually receiving the group?

If a user seems to be fulfilling the LuckPerms context in /lp user <user> info but they don't get their primary group set when adding a higher weighted parent with the relevant context then set primary-group-calculation to all-parents-by-weight in the LuckPerms config.

Examples
CommandExplanation
/lp group default permission set essentials.fly true discordsrv:linked=truewill give all users access to /fly if they have their account linked to Discord

These can be disabled using a LuckPerms-Contexts entry in the DisabledPluginHooks config section.

Original implementation: https://github.com/DiscordSRV/DiscordSRV/pull/728