Download Player Roles — Minecraft Mods — MetaMods

Player Roles

Active

Downloads

0

Last update

4 months ago

Versions

1.16.4 — 1.21.7
Server
Fabric
Control
Utils

Player Roles for Fabric

Player Roles mod provides a flexible permission management system for Minecraft servers using Fabric. It allows assigning special roles to users with specific permissions, similar to Discord's role system.

Main Features

The system operates through a JSON configuration file located in the configuration directory (<root>/config/roles.json). This file can be edited and reloaded during server runtime, which is convenient for quick testing and configuration.

Configuration Example

{
  "admin": {
    "level": 100,
    "overrides": {
      "name_decoration": {
        "style": ["red", "bold"],
        "suffix": {"text": ""}
      },
      "permission_level": 4,
      "command_feedback": true,
      "commands": {
        ".": "allow"
      }
    }
  },
  "spectator": {
    "level": 10,
    "overrides": {
      "commands": {
        "gamemode (spectator|adventure)": "allow"
      }
    }
  },
  "mute": {
    "level": 1,
    "overrides": {
      "mute": true
    }
  },
  "everyone": {
    "overrides": {
      "commands": {
        "help": "allow",
        ".*": "deny"
      }
    }
  }
}

This example defines four roles: admin, spectator, mute, and everyone. The everyone role is basic and automatically assigned to all players, it cannot be removed. Other roles act as additional settings on top of the basic role.

Override Types

Command Management

The commands setting allows controlling which commands players can use. You can set regular expressions for command matching and define processing strategies:

  • allow - permit command usage
  • deny - prohibit command usage
  • hidden - allow command but hide it from suggestions

Name Decoration

Using name_decoration, you can modify how player names appear in chat and player list. Available parameters:

  • style - text style (color, bold, underline)
  • prefix - text before the name
  • suffix - text after the name
  • contexts - where to apply decoration (chat, tab_list)

Chat Types

The chat_type setting allows replacing chat message decorations for specific roles. The system integrates with Minecraft's vanilla chat type registry.

Additional Features

  • permission_level - sets vanilla permission system level
  • mute - blocks ability to type in chat
  • command_feedback - enables command execution notifications
  • entity_selectors - allows using entity selectors

Advanced Features

Roles can inherit settings from other roles through the includes parameter. You can also apply roles to command blocks and function executors.

In-Game Management

Use the /role command for role management:

  • /role assign <player> <role> - assign role
  • /role remove <player> <role> - remove role
  • /role list <player> - show player's roles
  • /role reload - reload configuration

The system automatically resolves conflicts between roles by selecting settings from the role with the highest level.

Project members
Gegy

Gegy

NucleoidMC

NucleoidMC

Developer

Created: 17 Dec 2020

ID: 5034