RexChat Documentation

RexChat is a lightweight yet powerful chat management plugin for Minecraft servers. While it may work on older versions, we officially support Minecraft 1.20.4 through 1.21.11.

Requirements: Java 21 (Required), Minecraft 1.20.4 - 1.21.11 (Supported), Paper or Spigot server
Note: The plugin may work on versions below 1.20.4, but we only provide support for 1.20.4 and above.

Installation

  1. Download the latest RexChat.jar from GitHub Releases
  2. Place the jar file in your server's plugins folder
  3. Restart your server
  4. Configure the plugin in plugins/RexChat/config.yml
  5. Use /rc reload to apply changes without restarting
Optional: Install PlaceholderAPI for extended placeholder support

Commands

Command Aliases Description Permission
/rexchat /rc Main plugin command and reload rexchat.admin
/mutechat /mc Toggle chat mute on/off rexchat.mute
/clearchat /cc Clear chat messages rexchat.clear
/chatcolor /color Set your chat message color rexchat.chatcolor

Command Usage Examples

# Reload the plugin configuration
/rc reload

# Mute the chat (only staff can talk)
/mutechat

# Clear all chat messages
/clearchat

# View available chat colors
/chatcolor

# Set your chat color to red
/chatcolor set red

# Remove your chat color
/chatcolor off

Permissions

Permission Description Default
rexchat.admin Access to all plugin features OP
rexchat.mute Ability to mute/unmute chat OP
rexchat.clear Ability to clear chat OP
rexchat.bypass Bypass muted chat (can talk when muted) OP
rexchat.chatcolor Use colors and formatting in chat OP
rexchat.preview Use chat previews ([item]/[inv]) Everyone

Chat Formatting

RexChat allows you to fully customize how chat messages appear. You can configure different formats for different player groups.

Basic Format Configuration

chat-format:
  enabled: true
  format: "{prefix}&7{player}: &f{message}"
  player:
    hover:
      enabled: true
      lines:
        - "&7Health: &c{health}&7/&c{max_health}"
        - "&7World: &f{world}"
        - "&7Location: &f{x}&7, &f{y}&7, &f{z}"
        - "&7Ping: &f{ping}ms"

Group-Specific Formatting

You can override the chat format for specific groups (requires LuckPerms or Vault):

chat-format:
  groups:
    admin:
      format: "{prefix}&c{player}: &f{message}"
      hover:
        enabled: true
        lines:
          - "&cAdmin &7• &fPing: {ping}ms"
    moderator:
      format: "{prefix}&b{player}: &f{message}"

Chat Colors

Players can select from predefined chat colors using the /chatcolor command. Colors support both legacy codes and modern gradients/rainbow effects.

Configuring Chat Colors

chatcolor:
  enabled: true
  colors:
    red:
      format: "&c"
      permission: "rexchat.chatcolor.red"
      display-name: "Red"
    rainbow:
      format: ''
      permission: "rexchat.chatcolor.rainbow"
      display-name: "&cR&6a&ei&an&bb&do&5w"
    sunset:
      format: ''
      permission: "rexchat.chatcolor.sunset"
      display-name: "Sunset"

Using Chat Colors

  1. Player types /chatcolor to see available colors
  2. Player types /chatcolor set red to select a color
  3. All their messages will now appear in that color
  4. Use /chatcolor off to remove the color
Note: Players need the specific permission for each color (e.g., rexchat.chatcolor.red)

Player Mentions

Players can mention others in chat by typing their name. Mentioned players receive notifications with sound and title effects.

How Mentions Work

Mention Configuration

mention:
  enabled: true
  color: "&6"
  by-name: true
  sound:
    enabled: true
    name: "ENTITY_EXPERIENCE_ORB_PICKUP"
    volume: 0.8
    pitch: 1.2
  title:
    enabled: true
    title: "&6Mention!"
    subtitle: "&eYou were mentioned by &6{sender}"
    fade-in: 5
    stay: 40
    fade-out: 10

Item & Inventory Previews

Players can show their items or inventory in chat using special tokens. Other players can click to view them.

Item Preview

Hold an item and type one of these in chat:

Example: Check out my [item]!

Inventory Preview

Type one of these in chat to show your inventory:

Example: Look at my gear [inv]

Preview Configuration

chat-previews:
  enabled: true
  tokens:
    item: ["[item]", "[i]", "{item}", "{i}"]
    inventory: ["[inventory]", "[inv]", "{inventory}", "{inv}"]
Permissions: rexchat.preview (enabled by default for all players)

Chat Emojis

Players can use emoji shortcuts in chat that automatically convert to Unicode emojis.

Default Emojis

Shortcut Emoji
:) or :smile:
<3 or :heart:

Adding Custom Emojis

chat-emoji:
  enabled: true
  emojis:
    - name: "star"
      aliases: [":star:", "*"]
      replacement: "⭐"
    - name: "fire"
      aliases: [":fire:"]
      replacement: "🔥"

Custom Commands

Create custom commands that send messages to players. Perfect for rules, Discord links, store info, etc.

Single Message Command

commands:
  store:
    enabled: true
    command: "store"
    aliases: ["shop"]
    permission: ""
    message: "%rc_prefix%&6Store &7• &fVisit: &6https://store.example.com"

Multi-Line Command

commands:
  rules:
    enabled: true
    command: "rules"
    aliases: ["rule"]
    permission: ""
    message-list:
      - "%rc_prefix%&6Server Rules"
      - "&7• &fBe respectful to all players"
      - "&7• &fNo spamming or excessive caps"
      - "&7• &fNo griefing or stealing"
Tip: Leave permission: "" empty to allow everyone to use the command

Placeholders

RexChat supports various placeholders in chat format, hover text, and messages.

Built-in Placeholders

Placeholder Description
{player} Player's username
{display_name} Player's display name
{message} The chat message
{prefix} Player's prefix (from LuckPerms/Vault)
{world} Player's current world
{health} Player's current health
{max_health} Player's maximum health
{x}, {y}, {z} Player's coordinates
{ping} Player's ping in milliseconds
%rc_prefix% Plugin prefix from config

PlaceholderAPI Support

If PlaceholderAPI is installed, you can use any PAPI placeholder in your chat format:

format: "{prefix}&7{player} %vault_rank%: &f{message}"

Developer API

RexChat provides a developer API for other plugins to interact with its features.

Adding RexChat as a Dependency

Add RexChat to your plugin's plugin.yml:

depend: [RexChat]
# or
softdepend: [RexChat]

Getting the API Instance

import cc.rexsystems.rexChat.api.RexChatAPI;

public class YourPlugin extends JavaPlugin {
    
    private RexChatAPI rexChatAPI;
    
    @Override
    public void onEnable() {
        // Get API instance
        rexChatAPI = RexChatAPI.getInstance(this);
        
        if (rexChatAPI == null) {
            getLogger().warning("RexChat not found!");
            return;
        }
        
        getLogger().info("RexChat API loaded!");
    }
}

API Methods

Method Description
isChatMuted() Check if chat is currently muted
setChatMuted(boolean, String) Mute or unmute chat
clearChat(String) Clear chat for all players
getPlayerChatColor(Player) Get player's selected chat color
setPlayerChatColor(Player, String) Set player's chat color
sendFormattedMessage(Player, String) Send formatted message with colors
formatMessage(String) Format a message to Adventure Component

Usage Examples

// Check if chat is muted
if (rexChatAPI.isChatMuted()) {
    player.sendMessage("Chat is currently muted!");
}

// Mute chat
rexChatAPI.setChatMuted(true, "Console");

// Clear chat
rexChatAPI.clearChat("Admin");

// Get player's chat color
String color = rexChatAPI.getPlayerChatColor(player);

// Set player's chat color
boolean success = rexChatAPI.setPlayerChatColor(player, "rainbow");

// Send formatted message
rexChatAPI.sendFormattedMessage(player, "&6Hello &b{player}!");

// Format message to component
Component component = rexChatAPI.formatMessage("&aGreen text");

Events

RexChat fires custom events that you can listen to:

ChatMuteEvent

import cc.rexsystems.rexChat.api.events.ChatMuteEvent;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;

public class YourListener implements Listener {
    
    @EventHandler
    public void onChatMute(ChatMuteEvent event) {
        if (event.isMuted()) {
            // Chat was muted
            String executor = event.getExecutor();
        } else {
            // Chat was unmuted
        }
    }
}

ChatClearEvent

import cc.rexsystems.rexChat.api.events.ChatClearEvent;

@EventHandler
public void onChatClear(ChatClearEvent event) {
    String executor = event.getExecutor();
    // Chat was cleared by executor
}

Full Configuration Example

Here's the complete default configuration file with all available options:

# RexChat Configuration

# Update checker
update-checker:
  enabled: true
  notify-ops-on-join: false
  permission: "rexchat.admin"
  message: "%rc_prefix%&fA new version of &cRexChat &fis available: &c{latest}&7 (current: &f{current}&7). &fDownload: &chttps://www.spigotmc.org/resources/rexchat.122562/"

# Message Settings
messages:
  prefix: "&7[&6RexChat&7] "
  no-permission: "%rc_prefix%&fYou don't have permission to use this command."
  reload-success: "%rc_prefix%&fReloaded successfully!"
  command-not-found: "%rc_prefix%&fCommand not found."
  reload-usage: "%rc_prefix%&fUsage: /%cmd% reload"
  player-only: "%rc_prefix%&fThis command can only be used by players!"
  mention:
    sender: "%rc_prefix%&aYou mentioned &6{targets}"
    target: "%rc_prefix%&eYou were mentioned by &6{sender}"
    prevent-self: true
  preview:
    target-not-found: "%rc_prefix%&cPlayer not found."
    item:
      title: "&6Item: &f{player}"
      none: "%rc_prefix%&7You are not holding any item."
      hover: "&7Click to view {player}'s item"
      text: "&f[&f{Item} &bx{Amount}&f]"
      singular-text: "&f[&f{Item}&f]"
      empty-label: "&7[&eHold an item to show it&7]"
      token-empty-error: "%rc_prefix%&cYou need to hold an item to show it."
      open: "%rc_prefix%&7Opening item preview for &6{player}"
    inventory:
      title: "&6Inventory: &f{player}"
      hover: "&7Click to view {player}'s inventory"
      label-template: "&7[&fInventory&7]"
      open: "%rc_prefix%&7Opening inventory preview for &6{player}"

# Mentions
mention:
  enabled: true
  color: "&6"
  by-name: true
  sound:
    enabled: true
    name: "ENTITY_EXPERIENCE_ORB_PICKUP"
    volume: 0.8
    pitch: 1.2
  notify:
    sender: false
    target: true
  title:
    enabled: true
    title: "&6Mention!"
    subtitle: "&eYou were mentioned by &6{sender}"
    fade-in: 5
    stay: 40
    fade-out: 10

# Join/Leave Messages (leave blank to disable)
join-leave:
  join-message: ""
  leave-message: ""

# Chat reporting (1.19+)
chat-reporting:
  disable: true

# Chat Color Presets
chatcolor:
  enabled: true
  colors:
    red:
      format: "&c"
      permission: "rexchat.chatcolor.red"
      display-name: "Red"
    gold:
      format: "&6"
      permission: "rexchat.chatcolor.gold"
      display-name: "Gold"
    green:
      format: "&a"
      permission: "rexchat.chatcolor.green"
      display-name: "Green"
    aqua:
      format: "&b"
      permission: "rexchat.chatcolor.aqua"
      display-name: "Aqua"
    pink:
      format: "&d"
      permission: "rexchat.chatcolor.pink"
      display-name: "Pink"
    rainbow:
      format: ''
      permission: "rexchat.chatcolor.rainbow"
      display-name: "&cR&6a&ei&an&bb&do&5w"
    sunset:
      format: ''
      permission: "rexchat.chatcolor.sunset"
      display-name: "Sunset"
    ocean:
      format: ''
      permission: "rexchat.chatcolor.ocean"
      display-name: "Ocean"

# Chat Formatting
chat-format:
  enabled: true
  format: "{prefix}&7{player} {tag}: &f{message}"
  player:
    hover:
      enabled: true
      lines:
        - "&7Health: &c{health}&7/&c{max_health}"
        - "&7World: &f{world}"
        - "&7Location: &f{x}&7, &f{y}&7, &f{z}"
        - "&7Ping: &f{ping}ms"
  groups:
    helper:
      format: "{prefix}&7{player}: &a{message}"
      hover:
        enabled: true
        lines:
          - "&aHelper &7• &fPing: {ping}ms"
    moderator:
      format: "{prefix}&7{player}: &b{message}"
      hover:
        enabled: true
        lines:
          - "&bModerator &7• &fPing: {ping}ms"
    admin:
      format: "{prefix}&7{player}: &c{message}"
      hover:
        enabled: true
        lines:
          - "&cAdmin &7• &fPing: {ping}ms"

# Chat Emojis
chat-emoji:
  enabled: true
  emojis:
    - name: "smile"
      aliases: [":)", ":smile:"]
      replacement: "☺"
    - name: "heart"
      aliases: ["<3", ":heart:"]
      replacement: "❤"

# Chat Previews
chat-previews:
  enabled: true
  tokens:
    item: ["[item]", "[i]", "{item}", "{i}"]
    inventory: ["[inventory]", "[inv]", "{inventory}", "{inv}"]

# Chat Management
chat-management:
  mute:
    enabled: true
    permission: "rexchat.mute"
    muted-message: "%rc_prefix%&fThe chat is currently muted."
    mute-announcement: "%rc_prefix%&fThe chat has been muted by {player}"
    unmute-announcement: "%rc_prefix%&fThe chat has been unmuted by {player}"
  clear:
    enabled: true
    permission: "rexchat.clear"
    clear-message: "%rc_prefix%&fThe chat has been cleared by {player}"
    lines: 100

# Custom Commands
commands:
  discord:
    enabled: true
    command: "discord"
    aliases: ["dc"]
    permission: ""
    message-list:
      - "%rc_prefix%&6Discord Server"
      - "&7• &fJoin our community: &6https://discord.gg/yourserver"
      - "&7• &fOnline Members: &61,234+"
  rules:
    enabled: true
    command: "rules"
    aliases: ["rule"]
    permission: ""
    message-list:
      - "%rc_prefix%&6Server Rules"
      - "&7• &fBe respectful to all players"
      - "&7• &fNo spamming or excessive caps"
      - "&7• &fNo advertising or self-promotion"
      - "&7• &fNo griefing or stealing"
      - "&7• &fUse appropriate language"
  store:
    enabled: true
    command: "store"
    aliases: ["shop"]
    permission: ""
    message: "%rc_prefix%&6Store &7• &fVisit our store: &6https://store.yourserver.com"
  help:
    enabled: true
    command: "help"
    aliases: ["?"]
    permission: ""
    message-list:
      - "%rc_prefix%&6Available Commands"
      - "&7• &#ffa500/discord &7- &fJoin our Discord community"
      - "&7• &#ffa500/rules &7- &fView server rules"
      - "&7• &#ffa500/store &7- &fVisit our store"
      - "&7• &#ffa500/help &7- &fShow this help message"
Important: After making changes to the config, use /rc reload to apply them without restarting the server.

Support & Links