The Basics
LuckPerms embraces many concepts like “Inheritance” or ” Contexts” that might be confusing for a beginner. Consider this section a breakdown of those. :::info For a more in depth explanation of the plugin, one might use the official wiki.Permissions
A permission is simply put just a piece of text that plugins use to determine what a player can do. They are usually split by periods (likeminecraft.command.kick for the vanilla /kick command). A permission can have 3 states:
true: the player can then use the feature which is associated to the permissionfalsethe player is explicitly revoked access to this command or feature.- undefined: this permission has not been set for this group and defaults to either
trueorfalse, depending how the plugin which uses the permission has determined.
Groups
A group (or a “rank” as some prefer to call it) is a collection of permissions and other kinds of data which can be given to a player. This simplifies management of, lets say, the staff team as you can simply create a groupadmin and grant it * (this permission automatically allows access to everything) which can then be given to your admins and they will all have the same permissions. In this example it might seem counter intuitive, but for ranks with 100s of different permissions, it will become useful.
:::
One Group always exists: default. As its name implies, everybody is in this group, and it is used to give out permissions which every player should have.
Inheritance
Inheritance is very useful to minimise repeated work. Let us consider the following example: You have a groupVIP and a group MVP. The group VIP is only used to add features on top of the MVP group. Yet by setting the users group to MVP, they would have the permissions from VIP revoked. This is where inheritance comes into play. You can make MVP inherit VIP, so every permission that is granted to VIP is automatically reflected in the permissions of MVP.
Contexts
Contexts define the circumstances under which a permission or other data is applied. Still confused? Lets take thegamemode context as an example. Giving a permission to a player with the context gamemode=creative means that they player shall only have that permission if they are in game-mode creative. Quite simple, isn’t it? Many plugins add their own contexts, such as EssentialsX’ vanished pr god.
First Steps with LuckPerms
Storage
Your first step with LuckPerms will be choosing a storage solution. This is a very extensive topic, as each of the storage types come with their own advantages and disadvantages. A good write up on this would be the official article in the LuckPerms wiki. Essentially there are 3 types of storage:- Flat file (In-memory-databases, they work out-of-box)
- Text file (Slower than flat-file, but editable and readable in plain text)
- Database (fastest, readable, but requires an external Database Server)
Your First Commands!
Once you have LuckPerms installed, you will notice that you do not have access to its primary command/lp. You could set it all up through your console, but for the sake of simplicity the command lp user <your username> permission set * will give your player full access to every command to simplify the setup.
Now that that’s out of the way let’s get started!
Let’s say we want the following architecture:
default player. They should become a VIP and not an Admin!
First we have to create all those groups. Which is simple enough. It’s just /lp creategroup <Group Name>!
LuckPerms has many features to edit in its groups and it might overwhelm you at the beginning. But really the only parts you need to know right now are permission, parent, meta and setweight. The rest are rather advanced or generally not needed. You already know how to add permissions, so go ahead, give out all the permissions you want your groups to have! In case you screw up somewhere, there always is unset to revoke it.
In order to setup the inheritance/promote feature, you simply have to use the parent subcommand like this: /lp group admin parent add mod or generically /lp group <higher group> parent add <lower group>.
That’s the entire magic! Your setup is now working!
Prefixes and Rank Tags
LuckPerms does include the ability to set prefixes and suffixes in itsmeta submenu. But it does not apply them on its own! For that you need other plugins. A general plugin you will need is Vault. For now don’t worry about what Vault on its own does, just know that it’s important!
This intro will be split into 2 parts: Chat and Nametags (Tablist or above the playerhead).