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% 󙀸»&#FDFDFD %message%"
Available Placeholders
%player_name%
- Player's display name%message%
- The chat message contentAny PlaceholderAPI placeholder (e.g.,
%vault_rank%
,%player_health%
)
Color Support
PrimeChat supports multiple color formats:
Classic codes:
&c
for red,&a
for greenHex colors:
&#FF0000
for custom colorsGradients:
<#FF0000>Text</#FF5500>
for smooth color transitions
Hover Information
Enabling Hover Text
Configure hover information in config.yml
:
chat:
hover:
enabled: true
lines:
- "�BFFF&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 withprimechat.bypass.lock
can speakUnlock Chat:
/chat unlock
- Normal chat resumesVisual 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% 󙀸» &#FFFFFF%message%"
Simple Clean Format
format: "<%player_name%> %message%"
Technical Details
Chat Processing Order
Security Checks: Anti-spam, blocked words, advertising
Game Processing: Check for chat game answers
Format Application: Apply chat format with placeholders
Color Processing: Convert hex codes and gradients
Hover Creation: Generate hover text if enabled
Message Broadcast: Send to all online players
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