Permission Requirement

{
  "type": "PermissionRequirement",
  "permission": "example_npc.defeated",
  "prompt": "You must have defeated the Example NPC!"
}

"permission" can be any LuckPerms permission nodearrow-up-right and the player this requirement is being tested against must have it resolved as "true" for the permission to pass.

"prompt" is the text displayed in GUIs/chat messages when using this requirement.

Common Problems

  • None of my requirements work, they're all passing! If you/the player has a wildcard permission set (i.e., *, or example_npc.*), all permission nodes after the wildcard will be true. For mods like PPokedex that use permission nodes to track attainment, having that wildcard set for staff members will mean they can't use the functionality fully.

  • All of my sub permission nodes are passing! If you are setting up permission requirements to the example above, say "example_npc.team_aqua.craig.defeated", but for some reason you also give players the node "example_npc.team_aqua" to let them battle the NPCs, by default on Fabric this will not work. Fabric is the only LuckPerms implementation that has config setting "apply-sponge-implicit-wildcards" set to true by default. This effectively places a ".*" after each of your permissions. Change this to false in the luckperms.conf file to fix.

Last updated