Chat Features

PrimeChat provides extensive chat customization options to enhance your server's communication experience.

Custom Chat Format

Basic Format Configuration

The chat format is defined in config.yml:

chat:
  format: "&#E0E0E0<%rank%&r&#E0E0E0> %player_name% &#888888»&#FDFDFD %message%"

Available Placeholders

  • %player_name% - Player's display name

  • %message% - The chat message content

  • Any PlaceholderAPI placeholder (e.g., %vault_rank%, %player_health%)

Color Support

PrimeChat supports multiple color formats:

  • Classic codes: &c for red, &a for green

  • Hex colors: &#FF0000 for custom colors

  • Gradients: <#FF0000>Text</#FF5500> for smooth color transitions

Hover Information

Enabling Hover Text

Configure hover information in config.yml:

chat:
  hover:
    enabled: true
    lines:
      - "&#00BFFF&lPlayer Information"
      - ""
      - "&#FFA500Player: &#FFFFFF%player_name%"
      - "&#FFA500Rank: &#FFFFFF%rank%"
      - "&#FFA500Money: &#FFFFFF%vault_eco_balance_formatted%"
      - "&#FFA500Health: &#FFFFFF%player_health%/%player_max_health%"

Hover Features

  • Player Statistics: Show health, balance, rank

  • Custom Information: Add any PlaceholderAPI data

  • Rich Formatting: Use colors and formatting codes

  • Multi-line Support: Display multiple lines of information

Message Centering

Auto-Centering

PrimeChat can automatically center important messages:

settings:
  center-messages:
    enabled: true
    messages-to-center:
      - "chat.cleared"
      - "chat.locked"
      - "chat.unlocked"

How It Works

The centering system:

  • Calculates message width using Minecraft's font

  • Adds appropriate spacing to center text

  • Works with colored and formatted text

  • Maintains visual consistency

Chat Control Features

Chat Lock/Unlock

Control who can speak in public chat:

  • Lock Chat: /chat lock - Only players with primechat.bypass.lock can speak

  • Unlock Chat: /chat unlock - Normal chat resumes

  • Visual Feedback: Players see centered lock/unlock messages

Clear Chat

Remove all messages from chat:

  • Command: /chat clearchat

  • Permission: primechat.clearchat

  • Effect: Sends multiple blank lines to clear visible chat

  • Notification: Shows centered "Chat cleared" message

Advanced Features

Configuration Reload

Hot-reload configuration without restarting:

/chat reload

This reloads:

  • Main configuration (config.yml)

  • Messages (messages.yml)

  • GUI settings (gui.yml)

  • Chat games (chatgames.yml)

  • Sound effects (sounds.yml)

Integration Support

PrimeChat integrates with:

  • PlaceholderAPI: Full placeholder support

  • Vault: Permission groups and economy

  • LuckPerms: Permission-based formatting

  • EssentialsX: Player data integration

Formatting Permissions

Control who can use formatting:

# Color codes (&c, &a, etc.)
primechat.color: true

# Hex colors (&#FF0000)
primechat.hex: true  

# Gradient colors (<#FF0000>text</#FF5500>)
primechat.gradient: true

Examples

VIP Chat Format

format: "&#FFD700[&#FFFF00VIP&#FFD700] %player_name% &#FFFFFF: %message%"

Staff Chat Format

format: "&#FF0000[&#FFFFFF%rank%&#FF0000] %player_name% &#888888» &#FFFFFF%message%"

Simple Clean Format

format: "<%player_name%> %message%"

Technical Details

Chat Processing Order

  1. Security Checks: Anti-spam, blocked words, advertising

  2. Game Processing: Check for chat game answers

  3. Format Application: Apply chat format with placeholders

  4. Color Processing: Convert hex codes and gradients

  5. Hover Creation: Generate hover text if enabled

  6. Message Broadcast: Send to all online players

  7. Logging: Record message in logs

Performance Considerations

  • Hover text generation is optimized for minimal lag

  • Placeholder processing is cached when possible

  • Color parsing uses efficient algorithms

  • Message formatting happens asynchronously

Last updated