Ranks
Instead of assigning permissions to every user individually, we have groups of permissions, which can then be assigned to a user as a whole.
For example, in my admin
rank, I might add permission to ignore claims, and then assign users to the admin rank. This means that they will get all of the permissions from admin
, plus any they have themselves.
Players can have multiple ranks, similar to Discord roles. The rank with higher power
will take priority if two permissions are the same.
Permissions
On your server, there will be a number of features, commands, and functionality which is added to the game. Most of these actions have a permission associated with them, so you can control which users have access to each feature or command.
A permission is just a string, and is separated into parts using periods. For example, ftbutilities.back.infinite
is the permission to use the /back
command infinitely. Obviously we don’t want all users to have access to this, so we only give it to some users.
The string that represents a certain permission is also sometimes called a "permission node" or just "node" for short.
Commands
There are a few utility commands for ranks, so you don't have to do everything in the configs.
-
/ranks create <name>
- Creates a new rank -
/ranks delete|del <rank>
- Deletes a rank -
/ranks add <player> <rank>
- Adds rank to player -
/ranks remove <player> <rank>
- Removes rank from player -
/ranks get [player]
- Prints player's rank -
/ranks get_permission|getp <rank|player> <permission>
- Prints permission value for the specified rank or player -
/ranks set_permission|setp <rank|player> <permission> <value|none>
- Sets permission for rank or player
Config
Enabling Ranks
They are enabled by default, but if they aren't, set Enabled
& Override Chat
to true in config/ftbutilities.cfg
.
While //Comments are used in examples, they might not work in actual files, and will be removed by mod.
The ranks file is in local/ftbutilities/ranks.txt
.
Permissions
To add permission to rank simply write the node below rank definition and add value after :
Command Permissions
Command permissions are special and generated every time server loads. For example /heal
permission would be command.ftbutilities.heal
, because it was added by FTBUtilities mod and command name is heal. Tree commands are supported, e.g., /ranks get LatvianModder
would be command.ftbutilities.ranks.get
. Vanilla commands don't have a mod name, so /gamemode
would be command.gamemode
.
Example:
Will allow the rank to break sand in claims and use /heal
, and deny the rank to break stone in a claims.
See Example Config for a larger example file.
Default Rank Assignment
Default ranks aren't required, but it's still recommended to use them. Add default_player_rank: true
or default_op_rank: true
inside [rank]
.
They basically tell what rank to use when player doesn't have any rank assigned.
Example
Chat Formatting
To change player name formatting from default <Player>
to something more interesting, use ftbutilities.chat.name_format
permission.
All permissions that you can use to modify chat message text:
ftbutilities.chat.text.color
ftbutilities.chat.text.bold
ftbutilities.chat.text.italic
ftbutilities.chat.text.underlined
ftbutilities.chat.text.strikethrough
ftbutilities.chat.text.obfuscated
Example
Text Admin be added before player name with a space and both that text and name will be dark green, but the player name will be bold.
The result will be <Admin LatvianModder> Hello!
, where:
-
Admin
andLatvianModder
will be dark green; -
LatvianModder
will be bold; -
Hello!
will be italic.
Minecraft colour codes:
File Structure
Files that are inside local/ftbutilities/
:
-
player_ranks.txt
- Stores rank of players by Username/UUID -
ranks.txt
- Stores ranks