Skip to content
Ren edited this page Aug 29, 2022 · 4 revisions

» Home » Chat » Configuration

Configuration

  • chat-channels: Creating a section under here creates a new chat channel. You may have as many or as few chat channels as you wish.
    • chat-channel:
      • color: The colour of the chat channel.
        • red: The red value of the colour
        • green: The green value of the colour
        • blue: The blue value of the colour
      • radius: From how far away players should be able to hear messages sent to this channel. Measured in blocks. Setting to -1 means messages are global. If the channel uses a garble component, this should be the maximum range at which the message should be heard at all, and be larger than the garble range.
      • directed-pre-format-pipeline: A list of components for messages to be passed through for each player the message is directed to. This is run individually for each recipient of the message, prior to the format being run, so at this stage, messages are still in text form and you can perform various manipulations.
        • ==: DrunkenSlurComponent: Slurs a message when characters are drunk
          • drunkenness: How drunk a character should be to start slurring messages.
        • ==: GarbleComponent: Garbles a message when characters are far away
          • clear-radius: How far away should a message be completely clear in this channel before garble starts happening.
        • ==: LanguageComponent: Allows messages to be sent in languages the player character understands by starting them with the language in square brackets. Languages are passed through a cypher if the receiver does not understand the language. The receiver's understanding is then increased by a random amount based on their race.
        • ==: RadiusFilterComponent: Cancels messages where the recipient is too far away from the sender. The radius used is the radius of the chat channel.
      • format: This is the format applied to directed messages after processing by the pre-format pipeline has finished, and prior to being processed by the post-format pipeline.
        • ==: ChannelPart: The name of the channel
          • font: The resource location of the font for this component in the resource pack within assets//font. Defaults to "minecraft:default". Optional.
          • color: The hex colour code. Optional.
          • bold: Whether the text should be displayed as bold. true/false. Optional.
          • italic: Whether the text should be displayed as italic. true/false. Optional.
          • underlined: Whether the text should be displayed as underlined. true/false. Optional.
          • strikethrough: Whether the text should be displayed as strikethroughed. true/false. Optional.
          • obfuscated: Whether the text should be displayed as obfuscated. true/false. Optional.
          • insertion: When the text is shift-clicked by a player, this string is inserted in their chat input. It does not overwrite any existing text the player was writing. Optional.
          • hover: A hover action. Optional.
            • ==: ShowTextHoverAction: Show some text on hover.
              • text: A list of format parts.
          • click: A click action. Optional.
            • ==: CopyToClipboardClickAction: Copies some text to the clipboard.
              • text: The text to copy to the clipboard. String.
            • ==: OpenFileClickAction: Opens a file.
              • file: The path to the file on the user's computer.
            • ==: OpenURLClickAction: Opens a URL.
              • url: The URL to open in the user's browser.
            • ==: RunCommandClickAction: Runs a command.
              • command: The command to run.
            • ==: SuggestCommandClickAction: Pre-fills a command to be run.
              • command: The command to suggest.
        • ==: MessagePart: The message that has been sent.
          • font: The resource location of the font for this component in the resource pack within assets//font. Defaults to "minecraft:default". Optional.
          • color: The hex colour code. Optional.
          • bold: Whether the text should be displayed as bold. true/false. Optional.
          • italic: Whether the text should be displayed as italic. true/false. Optional.
          • underlined: Whether the text should be displayed as underlined. true/false. Optional.
          • strikethrough: Whether the text should be displayed as strikethroughed. true/false. Optional.
          • obfuscated: Whether the text should be displayed as obfuscated. true/false. Optional.
          • insertion: When the text is shift-clicked by a player, this string is inserted in their chat input. It does not overwrite any existing text the player was writing. Optional.
          • hover: A hover action. Optional.
            • ==: ShowTextHoverAction: Show some text on hover.
              • text: A list of format parts.
          • click: A click action. Optional.
            • ==: CopyToClipboardClickAction: Copies some text to the clipboard.
              • text: The text to copy to the clipboard. String.
            • ==: OpenFileClickAction: Opens a file.
              • file: The path to the file on the user's computer.
            • ==: OpenURLClickAction: Opens a URL.
              • url: The URL to open in the user's browser.
            • ==: RunCommandClickAction: Runs a command.
              • command: The command to run.
            • ==: SuggestCommandClickAction: Pre-fills a command to be run.
              • command: The command to suggest.
        • ==: ReceiverCharacterNamePart: The name of the character currently being played by the receiver of the message.
          • font: The resource location of the font for this component in the resource pack within assets//font. Defaults to "minecraft:default". Optional.
          • color: The hex colour code. Optional.
          • bold: Whether the text should be displayed as bold. true/false. Optional.
          • italic: Whether the text should be displayed as italic. true/false. Optional.
          • underlined: Whether the text should be displayed as underlined. true/false. Optional.
          • strikethrough: Whether the text should be displayed as strikethroughed. true/false. Optional.
          • obfuscated: Whether the text should be displayed as obfuscated. true/false. Optional.
          • insertion: When the text is shift-clicked by a player, this string is inserted in their chat input. It does not overwrite any existing text the player was writing. Optional.
          • hover: A hover action. Optional.
            • ==: ShowTextHoverAction: Show some text on hover.
              • text: A list of format parts.
          • click: A click action. Optional.
            • ==: CopyToClipboardClickAction: Copies some text to the clipboard.
              • text: The text to copy to the clipboard. String.
            • ==: OpenFileClickAction: Opens a file.
              • file: The path to the file on the user's computer.
            • ==: OpenURLClickAction: Opens a URL.
              • url: The URL to open in the user's browser.
            • ==: RunCommandClickAction: Runs a command.
              • command: The command to run.
            • ==: SuggestCommandClickAction: Pre-fills a command to be run.
              • command: The command to suggest.
        • ==: ReceiverPrefix: The prefix of the player receiving the message.
          • font: The resource location of the font for this component in the resource pack within assets//font. Defaults to "minecraft:default". Optional.
          • color: The hex colour code. Optional.
          • bold: Whether the text should be displayed as bold. true/false. Optional.
          • italic: Whether the text should be displayed as italic. true/false. Optional.
          • underlined: Whether the text should be displayed as underlined. true/false. Optional.
          • strikethrough: Whether the text should be displayed as strikethroughed. true/false. Optional.
          • obfuscated: Whether the text should be displayed as obfuscated. true/false. Optional.
          • insertion: When the text is shift-clicked by a player, this string is inserted in their chat input. It does not overwrite any existing text the player was writing. Optional.
          • hover: A hover action. Optional.
            • ==: ShowTextHoverAction: Show some text on hover.
              • text: A list of format parts.
          • click: A click action. Optional.
            • ==: CopyToClipboardClickAction: Copies some text to the clipboard.
              • text: The text to copy to the clipboard. String.
            • ==: OpenFileClickAction: Opens a file.
              • file: The path to the file on the user's computer.
            • ==: OpenURLClickAction: Opens a URL.
              • url: The URL to open in the user's browser.
            • ==: RunCommandClickAction: Runs a command.
              • command: The command to run.
            • ==: SuggestCommandClickAction: Pre-fills a command to be run.
              • command: The command to suggest.
        • ==: ReceiverProfileNamePart: The profile name of the receiver of the message
          • font: The resource location of the font for this component in the resource pack within assets//font. Defaults to "minecraft:default". Optional.
          • color: The hex colour code. Optional.
          • bold: Whether the text should be displayed as bold. true/false. Optional.
          • italic: Whether the text should be displayed as italic. true/false. Optional.
          • underlined: Whether the text should be displayed as underlined. true/false. Optional.
          • strikethrough: Whether the text should be displayed as strikethroughed. true/false. Optional.
          • obfuscated: Whether the text should be displayed as obfuscated. true/false. Optional.
          • insertion: When the text is shift-clicked by a player, this string is inserted in their chat input. It does not overwrite any existing text the player was writing. Optional.
          • hover: A hover action. Optional.
            • ==: ShowTextHoverAction: Show some text on hover.
              • text: A list of format parts.
          • click: A click action. Optional.
            • ==: CopyToClipboardClickAction: Copies some text to the clipboard.
              • text: The text to copy to the clipboard. String.
            • ==: OpenFileClickAction: Opens a file.
              • file: The path to the file on the user's computer.
            • ==: OpenURLClickAction: Opens a URL.
              • url: The URL to open in the user's browser.
            • ==: RunCommandClickAction: Runs a command.
              • command: The command to run.
            • ==: SuggestCommandClickAction: Pre-fills a command to be run.
              • command: The command to suggest.
        • ==: SenderCharacterNamePart: The name of the character currently being played by the sender of the message
          • font: The resource location of the font for this component in the resource pack within assets//font. Defaults to "minecraft:default". Optional.
          • color: The hex colour code. Optional.
          • bold: Whether the text should be displayed as bold. true/false. Optional.
          • italic: Whether the text should be displayed as italic. true/false. Optional.
          • underlined: Whether the text should be displayed as underlined. true/false. Optional.
          • strikethrough: Whether the text should be displayed as strikethroughed. true/false. Optional.
          • obfuscated: Whether the text should be displayed as obfuscated. true/false. Optional.
          • insertion: When the text is shift-clicked by a player, this string is inserted in their chat input. It does not overwrite any existing text the player was writing. Optional.
          • hover: A hover action. Optional.
            • ==: ShowTextHoverAction: Show some text on hover.
              • text: A list of format parts.
          • click: A click action. Optional.
            • ==: CopyToClipboardClickAction: Copies some text to the clipboard.
              • text: The text to copy to the clipboard. String.
            • ==: OpenFileClickAction: Opens a file.
              • file: The path to the file on the user's computer.
            • ==: OpenURLClickAction: Opens a URL.
              • url: The URL to open in the user's browser.
            • ==: RunCommandClickAction: Runs a command.
              • command: The command to run.
            • ==: SuggestCommandClickAction: Pre-fills a command to be run.
              • command: The command to suggest.
        • ==: SenderPrefixPart: The prefix of the player sending the message
          • font: The resource location of the font for this component in the resource pack within assets//font. Defaults to "minecraft:default". Optional.
          • color: The hex colour code. Optional.
          • bold: Whether the text should be displayed as bold. true/false. Optional.
          • italic: Whether the text should be displayed as italic. true/false. Optional.
          • underlined: Whether the text should be displayed as underlined. true/false. Optional.
          • strikethrough: Whether the text should be displayed as strikethroughed. true/false. Optional.
          • obfuscated: Whether the text should be displayed as obfuscated. true/false. Optional.
          • insertion: When the text is shift-clicked by a player, this string is inserted in their chat input. It does not overwrite any existing text the player was writing. Optional.
          • hover: A hover action. Optional.
            • ==: ShowTextHoverAction: Show some text on hover.
              • text: A list of format parts.
          • click: A click action. Optional.
            • ==: CopyToClipboardClickAction: Copies some text to the clipboard.
              • text: The text to copy to the clipboard. String.
            • ==: OpenFileClickAction: Opens a file.
              • file: The path to the file on the user's computer.
            • ==: OpenURLClickAction: Opens a URL.
              • url: The URL to open in the user's browser.
            • ==: RunCommandClickAction: Runs a command.
              • command: The command to run.
            • ==: SuggestCommandClickAction: Pre-fills a command to be run.
              • command: The command to suggest.
        • ==: SenderProfileNamePart: The profile name of sender of the message
          • font: The resource location of the font for this component in the resource pack within assets//font. Defaults to "minecraft:default". Optional.
          • color: The hex colour code. Optional.
          • bold: Whether the text should be displayed as bold. true/false. Optional.
          • italic: Whether the text should be displayed as italic. true/false. Optional.
          • underlined: Whether the text should be displayed as underlined. true/false. Optional.
          • strikethrough: Whether the text should be displayed as strikethroughed. true/false. Optional.
          • obfuscated: Whether the text should be displayed as obfuscated. true/false. Optional.
          • insertion: When the text is shift-clicked by a player, this string is inserted in their chat input. It does not overwrite any existing text the player was writing. Optional.
          • hover: A hover action. Optional.
            • ==: ShowTextHoverAction: Show some text on hover.
              • text: A list of format parts.
          • click: A click action. Optional.
            • ==: CopyToClipboardClickAction: Copies some text to the clipboard.
              • text: The text to copy to the clipboard. String.
            • ==: OpenFileClickAction: Opens a file.
              • file: The path to the file on the user's computer.
            • ==: OpenURLClickAction: Opens a URL.
              • url: The URL to open in the user's browser.
            • ==: RunCommandClickAction: Runs a command.
              • command: The command to run.
            • ==: SuggestCommandClickAction: Pre-fills a command to be run.
              • command: The command to suggest.
        • ==: TextPart: Plain, pre-specified text.
          • text: The text to display. String. Required.
          • font: The resource location of the font for this component in the resource pack within assets//font. Defaults to "minecraft:default". Optional.
          • color: The hex colour code. Optional.
          • bold: Whether the text should be displayed as bold. true/false. Optional.
          • italic: Whether the text should be displayed as italic. true/false. Optional.
          • underlined: Whether the text should be displayed as underlined. true/false. Optional.
          • strikethrough: Whether the text should be displayed as strikethroughed. true/false. Optional.
          • obfuscated: Whether the text should be displayed as obfuscated. true/false. Optional.
          • insertion: When the text is shift-clicked by a player, this string is inserted in their chat input. It does not overwrite any existing text the player was writing. Optional.
          • hover: A hover action. Optional.
            • ==: ShowTextHoverAction: Show some text on hover.
              • text: A list of format parts.
          • click: A click action. Optional.
            • ==: CopyToClipboardClickAction: Copies some text to the clipboard.
              • text: The text to copy to the clipboard. String.
            • ==: OpenFileClickAction: Opens a file.
              • file: The path to the file on the user's computer.
            • ==: OpenURLClickAction: Opens a URL.
              • url: The URL to open in the user's browser.
            • ==: RunCommandClickAction: Runs a command.
              • command: The command to run.
            • ==: SuggestCommandClickAction: Pre-fills a command to be run.
              • command: The command to suggest.
      • directed-post-format-pipeline: A list of components for messages to be passed through for each player the message is directed to. This is run individually for each recipient of the message, after the format has been run, so at this stage, the messages has been converted to chat components (with hover/click elements etc)
        • ==: SendMessageComponent: Sends messages (as long as they haven't been cancelled by an earlier component) to the recipient of the message
        • ==: SnoopComponent: For messages where they have been cancelled, send them anyway if the recipient is currently snooping.
      • undirected-pipeline: A list of components for messages to be passed to once for each individual message. This allows for functionality such as logging, or bridging to other platforms such as IRC, Discord or the web.
        • ==: IRCComponent: Send messages to an IRC channel
          • irc-channel: The IRC channel to send messages to
          • irc-whitelisted: Whether the IRC channel should be whitelisted. This is currently restricted to people who have Voice/HOP/OP.
        • ==: DiscordComponent: Send messages to a Discord channel
          • discord-channel-id: The ID of the channel to send messages to
        • ==: LogComponent: Writes messages to a log. Logs are stored in plugins/rpk-chat-bukkit/logs/, are separated into dated folders, in which there is a log for each channel with a log component.
        • ==: UndirectedFormatComponent: Formats messages for undirected recipients (e.g. logging)
          • format: How to format the message. This may use the following variables:
            • $message: The message as received from the last component in the pipeline. If there are no messages that change the message, it will be the raw message as it was sent, with no player information etc.
            • $sender-prefix: The prefix of the sender. This is decided by the configured prefixes, and the permissions assigned to the sender
            • $sender-player: The name of the player sending the message. This will be according to the profile, so if a player has multiple Minecraft accounts linked to the same profile, it will use the profile's name as opposed to the Minecraft username.
            • $sender-character: The name of the active character of the player sending the message.
            • $channel: The name of the channel the message is being sent to
            • $color/$colour: The colour code of the channel.
        • ==: WebComponent: Sends messages to the web. At the current time, this does nothing, as the websocket protocol for chat messages has not been defined. Up until 1.9.x this interfaced with the built-in web UI.
      • joined-by-default: Whether players should be listening to the channel by default.
  • match-patterns:
    • Each section in here is a regular expression
      • groups: Each of the groups matched by the regular expression. Groups are surrounded in brackets (That's '(' and ')') and numbered from the first to the last, with the first being '1'.
        • group id: The key is the group ID from the regular expression. The value is the name of the channel to direct parts of messages that match the regular expression to.
  • irc: Settings related to IRC functionality
    • enabled: Whether to connect to the IRC server or not. Setting this to false disables all IRC functionality. You should not attempt to use IRC components for chat channels with this disabled.
    • name: What nickname to use for the IRC bot. This should usually be the name of your server.
    • real-name: The "Real Name" in IRC
    • login: The login in IRC
    • cap-enabled: Whether to enable CAP handling (negotiation of capabilities with the IRC server). This should probably be left enabled unless you know what you're doing and have a weird use-case.
    • auto-nick-change-enabled: When connecting with a nickname that is already in use, should we automatically change username? This will increment a number after the username every time the username is already taken.
    • auto-split-message-enabled: Split messages at the maximum line length automatically to prevent rejection from the server.
    • server: The server to connect to. Defaults to freenode but you can use another IRC server if you want. Be aware of any bot policies the server may have.
    • password: The NickServ password to use. The bot user can be registered on the instance by ops by using the !register [email] command, and verified with !verify [verification code].
  • discord: Settings related to Discord functionality
    • enabled: Whether to connect to Discord or not. Setting this to false disables all Discord functionality, you should not attempt to use Discord components for chat channels with this disabled.
    • token: The bot token. Create a bot at https://discord.com/developers/applications/ then copy the token from the bot tab into this field. Make sure to invite the bot to your server.
    • server-name: The name of the Discord server. This should exactly match how it is in Discord, and the bot should be in the server.
  • prefixes: Any configuration option in this section will be used as a prefix. The permission node will be "rpkit.chat.prefix.${prefix}", where ${prefix} is the name of the config item in this section. Any chat colour/formatting codes can be used in the options in this section.
  • chat-group: Chat group/PM related options
    • format: The format of chat group messages. The variables you may use are:
      • $message: The message being sent
      • $sender-player: The name of the player sending the message. This is their Minecraft username.
      • $sender-character: The name of the active character of the player sending the message.
      • $receiver-player: The name of the player receiving the message. This is their Minecraft username.
      • $receiver-character: The name of the active character of the player receiving the message.
      • $group: The name of the chat group

Recommended cache sizes

  • chat_group_invite id: This should be the size of the maximum expected amount of active chat group invites
  • chat_group_invite chat_group_id: This should be the size of the maximum expected amount of concurrently active chat groups
  • chat_group_invite minecraft_profile_id: This should be the size of the maximum number of players
  • chat_group_member id: This should be the size of the maximum number of players
  • chat_group_member chat_group_id: This should be the size of the maximum expected number of concurrently active chat groups
  • chat_group_member minecraft_profile_id: This should be the size of the maximum number of players
  • last_used_chat_group id: This should be the size of the maximum number of players
  • last_used_chat_group minecraft_profile_id: This should be the size of the maximum number of players
  • rpkit_chat_channel_mute id: This should be the size of the maximum number of players multiplied by the average number of channels they are expected to have muted at any one time
  • rpkit_chat_channel_speaker id: This should be the size of the maximum number of players
  • rpkit_chat_group id: This should be the size of the maximum expected number of concurrently used chat groups (including PMs)
  • rpkit_chat_group name: This should be the size of the maximum expected number of concurrently used chat groups (including PMs)
  • rpkit_snooper id: This should be the size of the maximum number of concurrently snooping people you expect

Permissions

rpkit.chat.command.listchatchannels:
    description: Allows listing chat channels
    default: true
rpkit.chat.prefix.[prefix]:
    description: Adds the prefix to the player when speaking in chat
    default: false
rpkit.chat.command.snoop.on:
    description: Allows enabling snoop
    default: op
rpkit.chat.command.snoop.off:
    description: Allows disabling snoop
    default: op
rpkit.chat.command.snoop.check:
    description: Allows checking snoop
    default: op
rpkit.chat.command.chatgroup:
    description: Allows using chat group commands
    default: true
rpkit.chat.command.chatgroup.create:
    description: Allows creation of chat groups
    default: true
rpkit.chat.command.chatgroup.disband:
    description: Allows disbanding chat groups
    default: true
rpkit.chat.command.chatgroup.invite:
    description: Allows inviting people to chat groups
    default: true
rpkit.chat.command.chatgroup.join:
    description: Allows joining chat groups
    default: true
rpkit.chat.command.chatgroup.leave:
    description: Allows leaving chat groups
    default: true
rpkit.chat.command.chatgroup.members:
    description: Allows listing members of chat groups
    default: true
rpkit.chat.command.chatgroup.message:
    description: Allows messaging a chat group
    default: true
rpkit.chat.command.message:
    description: Allows private messaging
    default: true
rpkit.chat.command.reply:
    description: Allows replying to private messages
    default: true
rpkit.chat.command.chatchannel.[channel]:
    description: Allows speaking in [channel]
    default: op
rpkit.chat.command.mute.[channel]:
    description: Allows muting [channel]
    default: op
rpkit.chat.command.unmute.[channel]:
    description: Allows unmuting [channel]
    default: op
rpkit.chat.listen.[channel]:
    description: Allows listening to [channel]
    default: op
Clone this wiki locally