Skip to content

Configuration

Emmanuel Lampe edited this page Jun 23, 2023 · 5 revisions

Configuration

To configure FairyChat, you'll need to modify the config.yml file located in the FairyChat plugin directory. The configuration file uses the YAML format, which is a human-readable data serialization standard. Below is a breakdown of the configuration options:

Redis Credentials

Redis is an open-source in-memory data structure store used for implementing NoSQL key-value databases. In the context of FairyChat, Redis is used for communicating between servers.

redisCredentials:
  enabled: false
  url: redis://localhost:6379
  • enabled: Specifies whether Redis support should be enabled. When enabled, chat messages, broadcasts, and private messages will be handled over Redis.
  • url: The URL of your Redis server.

Setting Redis Username and Password

If your Redis server requires a username and password for authentication, you can include these in the URL. The format is redis://username:password@localhost:6379. Replace username and password with your Redis server's actual username and password.

Special characters in passwords

Certainly! When using special characters in your Redis password (or username), you must URL encode these characters to ensure that they are correctly interpreted by your Redis client. URL encoding replaces unsafe ASCII characters with a "%" followed by two hexadecimal digits that represent the ASCII code of the character.

For example, if your Redis password is passw@rd$, the URL encoded version would be passw%40rd%24.

Here's how you can URL encode your Redis password:

  • Online tools: There are many online URL encoding tools available. You simply input your string and the tool will output the URL encoded version. Some popular tools include urlencoder.org and url-encode-decode.com.

Chat Format

The chat format determines how chat messages will appear in the chat window.

chatFormat: <#5E548E><player_name></#5E548E> <dark_gray>»</dark_gray> <gray><message></gray>

The chatFormat value is written in the MiniMessage format, which allows for rich text formatting in Minecraft. It uses placeholders (like <player_name> and <message>) that get replaced with dynamic content when the chat is being processed. For a list of all available placeholders, refer to the MiniPlaceholders wiki.

Group Formats

Group formats allow you to define different chat formats based on the player's group. This is especially useful for distinguishing between different ranks or roles on your server.

groupFormats:
  admin: <dark_red><player_name></dark_red> <dark_gray>»</dark_gray> <white><message></white>

In the above example, players in the "admin" group will have their chat messages displayed in a different format. The format is also written in MiniMessage format and supports the same placeholders as the chatFormat.

Private Messaging

This section allows you to configure the private messaging feature of FairyChat.

privateMessaging:
  format:
    <dark_gray>[<#5E548E>PM</#5E548E>] <gray><sender_name></gray> → <#9F86C0><recipient_name></#9F86C0>
    »<dark_gray> <gray><message></gray>
  recipientExpirationSeconds: 90
  aliases:
    reply:
      - r
      - answer
    pm:
      - msg
      - message
      - tell
      - whisper
  • format: The format used for private messages, written in MiniMessage format.
  • recipientExpirationSeconds: The duration (in seconds) until a recipient can no longer respond to a private message.
  • aliases: Alternative commands that can be used for reply and pm.

This page was last updated on June 23, 2023.

Clone this wiki locally