Ranks

Terminology


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 of two permissions are the same.

Permission

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:
[some_rank]
power: 20
ftbutilities.claims.block.edit.minecraft.sand: true
ftbutilities.claims.block.edit.minecraft.stone: false
ftbutilities.homes.max: 10
ftbutilities.claims.max_chunks: 30
ftbutilities.chunkloader.max_chunks: 15
command.ftbutilities.heal: true

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
[player] // This rank will be used for players that don't have a rank assigned
power: 1
default_player_rank: true
command.heal: true

[admin] // This rank will be used for OPs that don't have a rank assigned
power: 1000
default_op_rank: true
command: true // Allows to use all commands

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
[admin]
ftbutilities.chat.name_format: <&2Admin &l{name}&r>
ftbutilities.chat.text.italic: true

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 LatvianModderHello!, where:

  • Admin and LatvianModder will be dark green;
  • LatvianModder will be bold;
  • Hello! will be italic.
Minecraft color codes:

Color-codes.png

File Structure

Files that are inside local/ftbutilities/:

  • player_ranks.txt - Stores rank of players by Username/UUID
  • ranks.txt - Stores ranks
Example config
[player] // Make this the default rank for players
power: 1
default_player_rank: true
ftbutilities.claims.block.edit.gravestone.gravestone: true // Allow all players to break gravestones (this is already the default in mod, so you don't actually need to add it)
command.ftbutilties.home: false // Deny players from using homes
command.stop: true // Allow players to use vanilla /stop command
ftbutilities.claims.max_chunks: 30 // Set max claimable chunks to 30

[vip]
power: 10
ftbutilities.claims.max_chunks: 80 // Set max claimable chunks to 80, overrides player
ftbutilities.chunkloader.max_chunks: 40 // Set max loadable chunks to 80
ftbutilities.chat.name_format: "<VIP &l{name}&r>" // Change name to bold letters and will have VIP in front of the name

[admin] // Make this the default rank for OPs
power: 1000
default_op_rank: true
command: true // Give admins all commands
ftbutilities.chat.name_format: "<&2{name}&r>" // Name color will be dark green

Revision #10
Created Fri, Apr 3, 2020 2:17 PM by LatvianModder
Updated Wed, May 6, 2020 10:50 PM by LatvianModder