Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save arnokeesman/c9c8d926fb576fcefe53ec6ff03919da to your computer and use it in GitHub Desktop.
Save arnokeesman/c9c8d926fb576fcefe53ec6ff03919da to your computer and use it in GitHub Desktop.
Setting up prefixes with Player Roles on a fabricmc server

This tutorial assumes you have a fabricmc server with fabric-api installed

Mods used in this tutorial

Configuring the mods

Player Roles

In your player roles config (/config/roles.json) add a role for which you want a prefix, for exameple:

  "owner": {
    "overrides": {
      "permission_keys": {
        "role.owner": "allow"
      }
    }
  },

Your config would then look like this: Player Roles config Reload Player Roles by running /role reload

Styled Chat

In your Styled Chat config (/config/styled-chat.json) add a permission based style to the styles at the bottom of the config, for example:

    {
      "require": {
        "type": "permission",
        "permission": "role.owner"
      },
      "display_name": "<blue>Owner</blue> ${default}",
      "message_formats": {},
      "formatting": {},
      "emoticons": {}
    }

Notes:

  • When adding multiple styles, please makes sure it's still a valid JSON, a proper text editor will show you any mistakes you've made, you do not have to install anything, you can also just use vscode.dev
  • For styling the prefix and the username use Simplified Text Format, formatting with & or § will not work.

Your config should now look something like this: Styled Chat config Reload Styled Chat by running /styledchat reload

Styled Player List

In your Styled Player List config (/config/styledplayerlist/config.json) change some values to update the names. Set changePlayerName to true and playerNameUpdateRate to 20 as shown below Styled Player List config Reload Styled Chat by running /styledplayerlist reload

Result

in-game screenshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment