LuckPerms Integration
LuckPerms Integration
Section titled “LuckPerms Integration”The Achievement plugin integrates with LuckPerms for automatic prefix retrieval and rich color formatting.
Overview
Section titled “Overview”When LuckPerms is installed, the plugin:
- Automatically detects LuckPerms at runtime
- Retrieves player prefixes from LuckPerms groups
- Supports all LuckPerms color formats
- Combines prefixes with achievement titles in chat
Installation
Section titled “Installation”- Install LuckPerms on your server
- The Achievement plugin automatically detects it
- No additional configuration required
Check server logs for confirmation:
[KyuubiSoft Achievements] LuckPerms integration enabledChat Format
Section titled “Chat Format”With LuckPerms integration, chat messages display as:
[LuckPerms Prefix] [Achievement Title] Username: MessageExample:
[Admin] [Spider Slayer] Steve: Hello everyone!Color Support
Section titled “Color Support”The plugin supports all LuckPerms color formats:
MiniMessage Tags
Section titled “MiniMessage Tags”<red>Text</red><gold>Text</gold><#FF5555>Hex Color</#FF5555>Gradients
Section titled “Gradients”<gradient:#FF0000:#00FF00>Rainbow Text</gradient>Rainbow
Section titled “Rainbow”<rainbow>Colorful Text</rainbow>Legacy Codes
Section titled “Legacy Codes”&a Green&b Aqua&c Red&6 GoldPrefix Configuration in LuckPerms
Section titled “Prefix Configuration in LuckPerms”Via Commands
Section titled “Via Commands”# Set prefix for a group/lp group admin meta setprefix 100 "<red>[Admin]</red> "
# Set prefix for a user/lp user Steve meta setprefix 100 "<gold>[VIP]</gold> "Via Config
Section titled “Via Config”In your LuckPerms group file:
admin: permissions: - "meta.prefix.100.<red>[Admin]</red> "Priority System
Section titled “Priority System”When multiple prefixes are available:
- User-specific prefix (highest priority)
- Primary group prefix
- Inherited group prefixes (by weight)
- Config fallback (groupPrefixes in config.json)
Trailing Styles
Section titled “Trailing Styles”The plugin extracts “trailing styles” from prefixes:
Example prefix:
<bold><#2b2b2b>[<gradient:#ff85fb:#85fbff>Mythic</gradient><#2b2b2b>] <#be8fff>Extracted trailing style:
- Color:
#be8fff(purple) - Bold:
true
Applied to username:
- Username appears in purple and bold
- Matches the prefix style
Suffix Support
Section titled “Suffix Support”LuckPerms suffixes are also supported:
/lp group vip meta setsuffix 100 " <gray>⭐</gray>"Chat output:
[VIP] [Title] Steve ⭐: Hello!Suffix trailing color applies to the message text.
Configuration Fallback
Section titled “Configuration Fallback”If LuckPerms is not installed or a group has no prefix, use the config fallback:
"groupPrefixes": { "admin": { "prefix": "<red>[Admin]</red> ", "priority": 100 }, "moderator": { "prefix": "<blue>[Mod]</blue> ", "priority": 75 }, "vip": { "prefix": "<gold>[VIP]</gold> ", "priority": 50 }, "default": { "prefix": "", "priority": 0 }}Lazy Initialization
Section titled “Lazy Initialization”The plugin uses lazy initialization for LuckPerms:
- Plugin loads before or after LuckPerms (order doesn’t matter)
- LuckPerms API is initialized on first use (first chat message)
- Works with
--accept-early-pluginsflag
This ensures compatibility regardless of plugin load order.
Nametag Display
Section titled “Nametag Display”Titles appear on player nametags:
Prefix Position (default)
Section titled “Prefix Position (default)”[Title] PlayerNameAbove Position
Section titled “Above Position” [Title] PlayerNameBelow Position
Section titled “Below Position” PlayerName [Title]Configure in config.json:
"display": { "titlePosition": "prefix" // "prefix", "above", "below"}Troubleshooting
Section titled “Troubleshooting”Prefix Not Showing
Section titled “Prefix Not Showing”-
Check LuckPerms is installed:
Terminal window /lp info -
Verify prefix is set:
Terminal window /lp user Steve info -
Check server logs for errors
Colors Not Working
Section titled “Colors Not Working”- Ensure correct MiniMessage syntax
- Check for unclosed tags
- Test with simple colors first:
Terminal window /lp group admin meta setprefix 100 "<red>[Admin]</red> "
Load Order Issues
Section titled “Load Order Issues”If you see:
LuckPerms found but not yet loadedThis is normal - the plugin uses lazy initialization and will work correctly.
Technical Details
Section titled “Technical Details”API Access
Section titled “API Access”The plugin accesses LuckPerms via:
LuckPermsProvider.get()- Main APIuserManager.getUser()- Get user datauser.getCachedData()- Get cached metadatametaData.getPrefix()- Get prefix string
Fallback Chain
Section titled “Fallback Chain”User Cached Metadata (contextual) ↓ (if null)User Cached Metadata (non-contextual) ↓ (if null)Primary Group Cached Metadata ↓ (if null)Direct Group Node Parsing (meta.prefix.*) ↓ (if null)Config groupPrefixes FallbackColor Conversion
Section titled “Color Conversion”LuckPerms prefixes (MiniMessage format) are converted to Hytale Message format:
MiniMessage: <red>[Admin]</red> ↓Adventure Component: TextComponent(color=RED, text="[Admin]") ↓Hytale Message: Message.raw("[Admin]").color("#FF5555")This conversion preserves:
- Colors (named, hex, gradients)
- Bold, italic, underline, strikethrough
- Nested styles