Язык

Styled Chat

Styled Chat

Modrinth

Style your server's chat as you want!

362.6k загрузок 398 подписчиков обновлено 3d ago
последняя v2.13.0+26.2 Modrinth
Fabric Quilt 1.17 – 26.2 ManagementSocialUtility

Logo

Styled Chat

It's a simple mod that allows server owners to change how their chat looks!

It adds support for modern chat formatting supported by Minecraft,
but ignored by many chat mods/plugins.

It's also compatible with any mods using Placeholder API.

It also supports changing style per player with permissions (supports LuckPerms and PlayerRoles)

This mod works only on Fabric Mod Loader and compatible!

If you have any questions, you can ask them on my Discord

Also check out my other mods and project, as you might find them useful!

Example image
Example image2

Commands (and permissions):

  • /styledchat - Main command (styledchat.main, available by default)
  • /styledchat reload - Reloads configuration and styles (requires styledchat.reload)
  • /styledchat set <player> <type> <value> - Changes personal 's style of to (requires styledchat.set)
  • /styledchat get <player> <type> - Sends 's style of (requires styledchat.get)
  • /styledchat clear <player> <type> - Clears 's style of (requires styledchat.clear)

Configuration:

You can find config file in ./config/styled-chat.json.
Formatting uses Simplified Text Format.
It supports usage of placeholders from Placeholder API.
Additionally, every message type has few own local variables.

{
  "CONFIG_VERSION_DONT_TOUCH_THIS": 3,
  "_comment": "Before changing anything, see https://github.com/Patbox/StyledChat#configuration",
  "text_formatting": {
    // Enables parsing of links in chat
    "parse_links": true,
    // Enables markdown
    "markdown": true,
    // Enables support for legacy (&x) codes in chat (only when typed by player)
    "legacy_formatting": false,
    // Enables formatting from other mods (might break StyledChat one, if mod implements it incorrectly)
    "formatting_from_other_mods": false
  },
  "chat_preview": {
    // Sends full message (entire formatting surrounding it) in chat preview
    "send_full_message": false,
    // Require chat preview for formatting, disabling it otherwise
    "require_for_formatting": false
  },
  "auto_completion": {
    // Enables autocompletion for tags (for example <red>, <rainbow>)
    "tags": false,
    // Enables autocompletion for tag aliases (for example <c>, <rb>)
    "tag_aliases": false,
    // Enables autocompletion for emoticons (for example :pos:, :item:)
    "emoticons": false
  },
  // Default style settings
  "default": {
    // Display name (local variables: ${default}, ${name})
    "display_name": "${default}",
    // Style of messages
    "message_formats": {
      // Chat message style (local variables: ${player}, ${message})
      "chat": "<${player}> ${message}",
      // Join message (local variables: ${player})
      "joined_the_game": "<yellow><lang:multiplayer.player.joined:'${player}'></yellow>",
      // Join message after name change (local variables: ${player}, ${old_name})
      "joined_after_name_change": "<yellow><lang:multiplayer.player.joined.renamed:'${player}':'${old_name}'></yellow>",
      // Join message for players joining for first time (local variables: ${player})
      "joined_for_first_time": "<yellow><lang:multiplayer.player.joined:'${player}'></yellow>",
      // Player leaving server (local variables: ${player})
      "left_game": "<yellow><lang:multiplayer.player.left:'${player}'></yellow>",
      // Player death message (local variables: ${player}, ${default_message})
      "base_death": "${default_message}",
      // Finishing advancement task (local variables: ${player}, ${advancement})
      "advancement_task": "<lang:chat.type.advancement.task:'${player}':'${advancement}'>",
      // Finishing advancement challenge (local variables: ${player}, ${advancement})
      "advancement_challenge": "<lang:chat.type.advancement.challenge:'${player}':'${advancement}'>",
      // Finishing advancement goal (local variables: ${player}, ${advancement}) 
      "advancement_goal": "<lang:chat.type.advancement.goal:'${player}':'${advancement}'>",
      // Team message, visible to player sending it (local variables: ${team}, ${displayName}, ${message})
      "sent_team_chat": "<lang:'chat.type.team.sent':'<hover\\:\\'<lang\\:chat.type.team.hover>\\'><suggest_command\\:\\'/teammsg \\'>${team}':'${displayName}':'${message}'>",
      // Team message, visible to other team members (local variables: ${team}, ${displayName}, ${message})
      "received_team_chat": "<lang:'chat.type.team.text':'<hover\\:\\'<lang\\:chat.type.team.hover>\\'><suggest_command\\:\\'/teammsg \\'>${team}':'${displayName}':'${message}'>",
      // Private message, visible to player sending (local variables: ${receiver}, ${sender}, ${message})
      "sent_private_message": "<gray><italic><lang:commands.message.display.outgoing:'${receiver}':'${message}'>",
      // Private message, visible to others (local variables: ${receiver}, ${sender}, ${message})
      "received_private_message": "<gray><italic><lang:commands.message.display.incoming:'${sender}':'${message}'>",
      // Output of /say command (local variables: ${player}, ${message})
      "say_command": "[${player}] ${message}",
      // Output of /me command (local variables: ${player}, ${message})
      "me_command": "<lang:'chat.type.emote':'${player}':'${message}'>",
      // Death message send when player's pet dies (local variables: ${default_message}, ${pet})
      "pet_death": "${default_message}"
    },
    // Style of link (local variables: ${link}, ${url})
    "link_style": "<underline><c:#7878ff>${link}",
    // Style of spoilers (local variables: ${spoiler})
    "spoiler_style": "<gray>${spoiler}",
    // Spoiler symbol used in spoiler style
    "spoiler_symbol": "▌",
    // Formatting accessible to players
    "formatting": {
      // "formatting tag": true/false
      "dark_red": true,
      "green": true,
      "underline": true,
      "dark_green": true,
      "black": true,
      "yellow": true,
      "bold": true,
      "italic": true,
      "dark_blue": true,
      "dark_purple": true,
      "gold": true,
      "red": true,
      "aqua": true,
      "gray": true,
      "light_purple": true,
      "blue": true,
      "white": true,
      "dark_aqua": true,
      "dark_gray": true,
      "spoiler": true,
      "strikethrough": true
    },
    // List of emoticons accessible to players (:name: in chat). Supports placeholders
    "emoticons": {
      // "name": "value"
      "potion": "🧪",
      "item": "[%player:equipment_slot mainhand%]",
      "trident": "🔱",
      "rod": "🎣",
      "shrug": "¯\\_(ツ)_/¯",
      "bow": "🏹",
      "bell": "🔔",
      "heart": "❤",
      "bucket": "🪣",
      "sword": "🗡",
      "shears": "✂",
      "pos": "%player:pos_x% %player:pos_y% %player:pos_z%",
      "fire": "🔥",
      "table": "(╯°□°)╯︵ ┻━┻",
      // Since 2.2.1+1.20.1 you can also import from files, using this syntax.
      "$emojibase:builtin:joypixels": "${emoji}",
      // value is the same as in others, just ${emoji} is replaced with read emojis (so you can apply fonts for example)
      // Format looks like this $TYPE:SOURCE:PATH
      // TYPE is "emojibase" for Emojibase.dev shorthand, "cldr" for Unicode cldr-json annotation 
      //      or "default" for same style as this file (excluding imports)
      // SOURCE points what type of storage it is, where PATH targets the file
      //     "builtin" loads it from json bundled with mod ("joypixels" or "emojibase")
      //     "from_file" loads it from file relative to config dir (for example "emoji.json" points to "[SERVER]/config/emoji.json)
      
    }
  },
  // List of styles with some requirements, applied from top do bottom
  "styles": [
    {
      // A requirement of style to apply to player
      "require": {
        "type": "...",
        // See information about these here: https://github.com/Patbox/PredicateAPI/blob/master/BUILTIN.md
      },
      /* Rest is the same as in "default" field, except all fields are fully optional */
    }
  ]
}

In chat formatting

If player has a required permissions (styledchat.format.[tag_name], where [tagname] is Text Parser tag), then they can use Simplified Text tags from within their chat.
Additionally, you can enable markdown and legacy (&X) formatting in the config

Example config

{
  "CONFIG_VERSION_DONT_TOUCH_THIS": 3,
  "_comment": "Before changing anything, see https://github.com/Patbox/StyledChat#configuration",
  "text_formatting": {
    "legacy_formatting": true,
    "parse_links": true,
    "markdown": true,
    "formatting_from_other_mods": true
  },
  "chat_preview": {
    "send_full_message": false,
    "require_for_formatting": false
  },
  "auto_completion": {
    "tags": false,
    "tag_aliases": false,
    "emoticons": true
  },
  "default": {
    "display_name": "${vanillaDisplayName}",
    "message_formats": {
      "chat": "${player} <dark_gray>»</dark_gray> ${message}",
      "joined_the_game": "<gray>✚</gray> <color:#85ff8f><lang:multiplayer.player.joined:'${player}'>",
      "joined_after_name_change": "<gray>✚</gray> <color:#85ff8f><lang:multiplayer.player.joined.renamed:'${player}':'${old_name}'>",
      "joined_for_first_time": "<yellow><lang:multiplayer.player.joined:'${player}'></yellow>",
      "left_game": "<gray>☁</gray> <color:#ff8585><lang:multiplayer.player.left:'${player}'>",
      "base_death": "<gray>☠</gray> <color:#d1d1d1>${default_message}",
      "advancement_task": "<lang:chat.type.advancement.task:'${player}':'${advancement}'>",
      "advancement_challenge": "<lang:chat.type.advancement.challenge:'${player}':'${advancement}'>",
      "advancement_goal": "<lang:chat.type.advancement.goal:'${player}':'${advancement}'>",
      "sent_team_chat": "<lang:'chat.type.team.sent':'<hover\\:\\'<lang\\:chat.type.team.hover>\\'><suggest_command\\:\\'/teammsg \\'>${team}':'${displayName}':'${message}'>",
      "received_team_chat": "<lang:'chat.type.team.text':'<hover\\:\\'<lang\\:chat.type.team.hover>\\'><suggest_command\\:\\'/teammsg \\'>${team}':'${displayName}':'${message}'>",
      "sent_private_message": "<gray>[<green>PM</green> → ${receiver}] <dark_gray>»<reset> ${message}",
      "received_private_message": "<gray>[<green>PM</green> ← ${sender}] <dark_gray>»<reset> ${message}",
      "say_command": "<red>[${player}] ${message}",
      "me_command": "<green>* ${player} ${message}",
      "pet_death": "Oh no! ${default_message}"
    },
    "link_style": "<underline><blue>${link}",
    "spoiler_style": "<dark_gray>${spoiler}",
    "spoiler_symbol": "▌",
    "formatting": {
      "dark_red": true,
      "underline": true,
      "yellow": true,
      "italic": true,
      "dark_blue": true,
      "dark_purple": true,
      "gold": true,
      "red": true,
      "aqua": true,
      "gray": true,
      "light_purple": true,
      "white": true,
      "pos": true,
      "dark_gray": true,
      "spoiler": true,
      "strikethrough": true,
      "st": true,
      "b": true,
      "item": true,
      "green": true,
      "dark_green": true,
      "black": true,
      "i": true,
      "bold": true,
      "blue": true,
      "dark_aqua": true
    },
    "emoticons": {
      "potion": "🧪",
      "trident": "🔱",
      "rod": "🎣",
      "shrug": "¯\\_(ツ)_/¯",
      "bow": "🏹",
      "bell": "<yellow>🔔",
      "heart": "<red>❤",
      "bucket": "🪣",
      "sword": "🗡",
      "shears": "✂",
      "fire": "🔥",
      "table": "<rb>(╯°□°)╯︵ ┻━┻"
    }
  },
  "styles": [
    {
      "require": {
        "type": "permission",
        "permission": "group.admin",
        "operator": 4
      },
      "display_name": "<dark_gray>[<red>Admin</red>]</dark_gray> <c:#ffe8a3>${vanillaDisplayName}</c>",
      "message_formats": {
        "chat": "${player} <dark_gray>»</dark_gray> <orange>${message}",
        "base_death": ""
      },
      "formatting": {},
      "emoticons": {}
    },
    {
      "require": {
        "type": "permission",
        "permission": "group.default"
      },
      "display_name": "<dark_gray>[<aqua>Player</aqua>]</dark_gray> <dark_aqua>${vanillaDisplayName}</dark_aqua>",
      "message_formats": {},
      "formatting": {},
      "emoticons": {}
    },
    {
      "require": {
        "type": "permission",
        "permission": "group.vip",
        "operator": 3
      },
      "message_formats": {},
      "formatting": {},
      "emoticons": {
        "potato": "<rb>Potato"
      }
    }
  ]
}

Версии

Release
2.13.0+26.2
fabric · 26.2 · 3d ago
**Full Changelog**: https://github.com/Patbox/StyledChat/compare/2.12.0+26.1.2...2.13.0+26.2
151
Release
2.12.0+26.1.2
fabric · 26.1.2 · 1mo ago
**Full Changelog**: https://github.com/Patbox/StyledChat/compare/2.12.0-pre.1+26.1...2.12.0+26.1.2
1.9k
Release
2.12.0-pre.1+26.1
fabric · 26.1, 26.1.1, 26.1.2 · 2mo ago
**Full Changelog**: https://github.com/Patbox/StyledChat/compare/2.11.0+1.21.11...2.12.0-pre.1+26.1
2.2k
Release
2.11.0+1.21.11
fabric, quilt · 1.21.11-rc2, 1.21.11-rc3, 1.21.11 · 6mo ago
**Full Changelog**: https://github.com/Patbox/StyledChat/compare/2.10.0+1.21.9...2.11.0+1.21.11
8.6k
Release
2.10.0+1.21.9
fabric, quilt · 1.21.9-rc1, 1.21.9, 1.21.10 · 8mo ago
**Full Changelog**: https://github.com/Patbox/StyledChat/compare/2.9.0+1.21.6...2.10.0+1.21.9
6.6k
Release
2.9.0+1.21.6
fabric, quilt · 1.21.6, 1.21.7, 1.21.8 · 12mo ago
**Full Changelog**: https://github.com/Patbox/StyledChat/compare/2.8.0+1.21.5...2.9.0+1.21.6
11.2k
Release
2.8.0+1.21.5
fabric, quilt · 1.21.5-rc1, 1.21.5 · 15mo ago
**Full Changelog**: https://github.com/Patbox/StyledChat/compare/2.7.2+1.21.3...2.8.0+1.21.5
5.4k
Release
2.1.7+1.19.4
fabric, quilt · 1.19.4 · 16mo ago
**Full Changelog**: https://github.com/Patbox/StyledChat/compare/2.1.6+1.19.4...2.1.7+1.19.4
156
Release
2.3.1+1.20.2
fabric, quilt · 1.20.2-rc2, 1.20.2 · 16mo ago
**Full Changelog**: https://github.com/Patbox/StyledChat/compare/2.3.0+1.20.2...2.3.1+1.20.2
134
Release
2.4.2+1.20.4
fabric, quilt · 1.20.3, 1.20.4 · 16mo ago
**Full Changelog**: https://github.com/Patbox/StyledChat/compare/2.4.0+1.20.3...2.4.2+1.20.4
955
Release
2.7.2+1.21.3
fabric, quilt · 1.21.3, 1.21.4 · 16mo ago
**Full Changelog**: https://github.com/Patbox/StyledChat/compare/2.7.1+1.21.3...2.7.2+1.21.3
3.8k
Release
2.6.1+1.21
fabric, quilt · 1.21-rc1, 1.21, 1.21.1 · 16mo ago
**Full Changelog**: https://github.com/Patbox/StyledChat/compare/2.7.0+1.21.2...2.6.1+1.21
30.6k

Комментарии 0

Пока нет комментариев. Будь первым, кто поделится мнением.

Скачать Styled Chat

R 2.13.0+26.2 26.2 fabric 482 KB R 2.12.0+26.1.2 26.1.2 fabric 482 KB R 2.12.0-pre.1+26.1 26.1, 26.1.1, 26.1.2 fabric 490 KB R 2.11.0+1.21.11 1.21.11-rc2, 1.21.11-rc3, 1.21.11 fabric, quilt 511 KB R 2.10.0+1.21.9 1.21.9-rc1, 1.21.9, 1.21.10 fabric, quilt 508 KB R 2.9.0+1.21.6 1.21.6, 1.21.7, 1.21.8 fabric, quilt 503 KB R 2.8.0+1.21.5 1.21.5-rc1, 1.21.5 fabric, quilt 496 KB R 2.1.7+1.19.4 1.19.4 fabric, quilt 308 KB R 2.3.1+1.20.2 1.20.2-rc2, 1.20.2 fabric, quilt 389 KB R 2.4.2+1.20.4 1.20.3, 1.20.4 fabric, quilt 467 KB R 2.7.2+1.21.3 1.21.3, 1.21.4 fabric, quilt 481 KB R 2.6.1+1.21 1.21-rc1, 1.21, 1.21.1 fabric, quilt 476 KB R 2.2.4+1.20.1 1.20.1 fabric, quilt 383 KB R 2.7.1+1.21.3 1.21.3, 1.21.4 fabric, quilt 481 KB R 2.7.0+1.21.2 1.21.2-rc1, 1.21.2, 1.21.3 fabric, quilt 478 KB R 2.6.0+1.21 1.21-rc1, 1.21, 1.21.1 fabric, quilt 475 KB R 2.5.0+1.20.5 1.20.5-rc2, 1.20.5, 1.20.6 fabric, quilt 469 KB R 2.4.0+1.20.3 1.20.3-rc1, 1.20.3, 1.20.4 fabric, quilt 390 KB R 2.3.0+1.20.2 1.20.2-rc2, 1.20.2 fabric, quilt 388 KB R 2.2.3+1.20.1 1.20.1 fabric, quilt 383 KB R 2.0.4+1.19.2 1.19.2 fabric, quilt 275 KB R 2.2.2+1.20.1 1.20.1 fabric, quilt 376 KB R 2.2.1+1.20.1 1.20.1 fabric, quilt 374 KB R 2.2.0+1.20 1.20-rc1, 1.20, 1.20.1 fabric, quilt 310 KB R 2.1.6+1.19.4 1.19.4 fabric, quilt 307 KB R 2.1.5+1.19.4 1.19.4 fabric, quilt 307 KB R 2.1.4+1.19.3 1.19.3 fabric, quilt 291 KB R 2.0.3+1.19.2 1.19.2 fabric, quilt 274 KB R 2.1.3+1.19.3 1.19.3, 1.19.4 fabric, quilt 291 KB R 2.1.2+1.19.3 1.19.3 fabric, quilt 283 KB R 2.1.1+1.19.3 1.19.3 fabric, quilt 283 KB R 2.1.0+1.19.3 1.19.3-rc1, 1.19.3 fabric, quilt 276 KB R 2.0.2+1.19.2 1.19.2 fabric, quilt 274 KB R 2.0.1+1.19.2 1.19.2 fabric, quilt 273 KB R 2.0.0+1.19.2 1.19.2 fabric, quilt 273 KB R 1.4.1+1.19.2 1.19.2 fabric, quilt 166 KB B 1.4.0+1.19.1 1.19.1, 1.19.2 fabric, quilt 165 KB R 1.3.3+1.19 1.19 fabric, quilt 161 KB R 1.3.2+1.19 1.19 fabric, quilt 157 KB R 1.3.1+1.19 1.19 fabric, quilt 155 KB B 1.3.0+1.19 1.19-rc2 fabric, quilt 154 KB R 1.2.3+1.18.1 1.18, 1.18.1, 1.18.2 fabric, quilt 197 KB R 1.2.2+1.18 1.18, 1.18.1 fabric 190 KB R 1.2.1+1.18 1.18 fabric 189 KB R 1.2.0 1.17.1 fabric 175 KB R 1.1.0 1.17 fabric 64 KB R 1.0.2 1.17 fabric 62 KB R 1.0.1 1.17 fabric 59 KB R 1.0.0 1.17 fabric 56 KB

Файлы отдаются напрямую с первоисточника. Modgrid не хранит и не изменяет их.