LuckPerms: ranks and permissions on a Minecraft server
Set up ranks with inheritance, prefixes and the web editor in LuckPerms, and move your staff from OP to proper permissions.
On many servers permissions look like this: the owner and two friends have OP, everyone else has nothing. LuckPerms sorts that into groups that inherit from each other. Setting up the basic ranks takes about fifteen minutes.
What LuckPerms is and where it runs
LuckPerms is a permissions manager. Every plugin or mod command has its own permission node, for example essentials.home. LuckPerms decides who has which node, through groups assigned to players.
Unlike most add-ons, LuckPerms has builds for almost every platform:
| Engine | LuckPerms build |
|---|---|
| Paper, Purpur, Spigot | Bukkit (plugin in plugins) |
| Fabric | Fabric (mod in mods, needs Fabric API) |
| NeoForge, Forge | NeoForge or Forge (mod in mods) |
| Velocity, BungeeCord | separate proxy build |
The commands are the same everywhere, so this guide works whatever your engine. On a plugin server you install it from Plugins, on a modded one from Mods, or you download the file from luckperms.net.
First steps after installing
After a server restart, LuckPerms creates the default group, which every player belongs to. First give yourself full access to LuckPerms itself. Type this in the panel console (without a slash):
lp user YourName permission set luckperms.* true
Now create the ranks. An example for a typical survival server:
lp creategroup vip
lp creategroup moderator
lp creategroup admin
lp group vip parent add default
lp group moderator parent add vip
lp group admin parent add moderator
parent add means inheritance: a moderator has everything a VIP has, and a VIP everything a regular player has. That way a permission added to default immediately reaches every rank.
You assign permissions and players like this:
lp group default permission set essentials.home true
lp group moderator permission set coreprotect.inspect true
lp user Name parent add moderator
lp group admin meta setprefix 100 "&c[Admin] "
lp group admin setweight 100
The number before the prefix is its priority. When a player has several groups with prefixes, the one with the highest priority is shown. setweight sets the weight of the group itself, which orders groups relative to each other. The simplest approach is to keep both numbers the same.
The web editor
Typing commands for dozens of permissions gets tiring. Type:
lp editor
You get a link to the editor on the LuckPerms website. It shows all groups, their permissions, prefixes and inheritance, and you can search for nodes and add them from a list. After your changes, click Save. The editor shows an lp applyedits command with a code that you paste into the console. Only then do the changes reach the server.
If you do not know which permission a command needs, run lp verbose on, ask a player to type the command and check in the console which node was checked. Turn it off with lp verbose off.
Moving from OP to permissions
- Take a backup of the server.
- Write down everyone with OP (the
ops.jsonfile in Files). - Assign each of them the right group:
lp user Name parent add admin. - Remove OP with
deop Name. Keep it for yourself at most. - Check that nobody lost commands they need. Add missing permissions to the group, not to a single player.
On Paper, plugins/LuckPerms/config.yml has an enable-ops option. Set to false, it turns OP off completely, and only LuckPerms counts.
Avoid giving * to anyone but yourself. It is the equivalent of OP, including the permissions to ban, change game mode and edit the world.
Where LuckPerms stores its data
By default in a local H2 database file in the plugin folder. For one server that is enough. If you run several servers behind a proxy and want shared ranks, create a MySQL database in Databases in the panel and set storage-method: mysql in config.yml, with the connection details in the data section.
Common questions
Does LuckPerms work on Fabric and NeoForge? Yes. LuckPerms has separate builds for Bukkit (Paper, Purpur, Spigot), Fabric, Forge, NeoForge and for the Velocity and BungeeCord proxies. The commands are the same.
How do I add a player to a rank? With lp user Name parent add groupname, typed in the console or in the game by someone with LuckPerms permissions. The player gets the group's permissions immediately.
Changes in the LuckPerms editor do nothing. Why? The editor does not save anything to the server by itself. After clicking Save, copy the lp applyedits command with its code and run it in the console.
How do I show a rank prefix in chat? With lp group name meta setprefix "text". The prefix is displayed by a chat plugin, for example EssentialsX Chat, which reads it through Vault. See EssentialsX.
Can I turn OP off completely? On Paper, yes: set enable-ops: false in plugins/LuckPerms/config.yml. First make sure your own account has full permissions in LuckPerms.
The plugin installer, console and a MySQL database for your server come with every plan on our Minecraft server hosting.