Overview
Player Roles provides a simple implementation for managing permissions on Fabric servers using a system inspired by Discord-style roles. This mod allows server administrators to define specific roles and assign them to players, creating a flexible hierarchy for controlling game behavior.
Configuration and Management
All roles and their associated permissions are defined within a JSON file located at config/roles.json. A key feature of this system is that the configuration can be reloaded at runtime, allowing for rapid iteration and permission changes without requiring a server restart.
To manage conflicts when a player holds multiple roles, the mod uses a level-based resolution system. Real talk, each role is assigned a level, and when multiple roles attempt to modify the same setting, the role with the highest level takes precedence.
Supported Overrides
The mod uses a generic override system to modify various aspects of the Minecraft experience. Supported override types include:
- Commands: Use regular expression patterns to
allowordenyspecific commands. You can also use thehiddenresult to allow a command while removing it from player suggestions. - Name Decoration: Modify how player names appear in the
chatandtab_listcontexts. And this includes setting astyle(hex colors or formatting), as well as adding aprefixorsuffix. But it also supportshovereffects to show text, items, or entities. - Chat Types: Replace chat message decorations by integrating with the vanilla
minecraft:chat_typeregistry. - Other Overrides: The system also supports
mute,command_feedback,permission_level,permissions(via the Fabric Permission API), andentity_selectors.
Technical Details
This is a server-side required mod and is unsupported on the client side. It's licensed under the MIT License and is designed specifically for the Fabric mod loader. The mod supports several Minecraft versions, including 26.3, 26.2, 26.1.2, 26.1.1, 26.1, 1.21.8, 1.21.7, 1.21.6, 1.21.11, 1.21.10, and 1.21.9.
