Skip to main content

Overview

The Prefixes Plugin provides comprehensive rank management for chat and tab list displays. It integrates with LuckPerms by default but can be extended with custom implementations. The plugin uses Adventure Components and MiniMessage for rich text formatting.
The plugin is currently taking a break, and the documentation needs a refresh. Stay updated through our Community Discord.

Supported Software

Server TypeAPI SupportLuckPermsPlugin Support
Paper & Forks✅ Yes✅ Yes✅ Yes
Spigot & Forks✅ Yes✅ Yes✅ Yes
Minestom✅ Yes❌ No❌ No
Minestom support requires custom implementation using the provided API.

Quick Setup

  1. Download the plugin from GitHub
  2. Place it in your server’s plugins folder
  3. Start your server
  4. Configure using LuckPerms and config.json

Configuration

LuckPerms Integration

The plugin automatically syncs with LuckPerms groups, converting them to prefix groups with their respective prefixes, suffixes, and team colors.
# Set group prefix
/lp group admin meta addprefix 100 "<red>[Admin] "

# Set group suffix
/lp group admin meta addsuffix 100 " <gray>✦"

# Set team color (Spigot: use ChatColor, others: use hex)
/lp group admin meta set color #FF0000

Chat Configuration

Configure chat format in config.json:
{
  "chatFormat": "<prefix><name_colored><suffix><gray>:</gray> <white><message></white>"
}
Available placeholders:
PlaceholderDescription
namePlayer’s name
name_coloredName with team color
prefixPlayer’s prefix
suffixPlayer’s suffix
messageChat message

API Usage

Accessing the API

val prefixesApiProvider = Bukkit.getServicesManager()
    .getRegistration(PrefixesApi::class.java)
val api: PrefixesApi = prefixesApiProvider.provider

// Use API
api.setPrefix(player.uniqueId, Component.text("[VIP] "))

Core API Methods

// Player Management
fun setWholeName(uniqueId: UUID, group: PrefixesGroup)
fun setPrefix(uniqueId: UUID, prefix: Component)
fun setSuffix(uniqueId: UUID, suffix: Component)
fun setColor(uniqueId: UUID, color: String)

// Group Management
fun getGroups(): List<PrefixesGroup>
fun getHighestGroup(uniqueId: UUID): PrefixesGroup
fun addGroup(group: PrefixesGroup)

Custom Implementation

Creating a Custom Group

class CustomGroup : PrefixesGroup {
    override fun getName(): String = "vip"
    override fun getPrefix(): Component = Component.text("[VIP] ")
    override fun getSuffix(): Component = Component.text(" ⭐")
    override fun getColor(): String = "#FFD700"
    override fun getPriority(): Int = 100

    override fun containsPlayer(uniqueId: UUID): Boolean {
        // Custom logic
        return true
    }
}

Custom Actor Implementation

class CustomActor : PrefixesActor {
    override fun applyGroup(target: UUID, group: PrefixesGroup) {
        // Apply group formatting
    }

    override fun setPrefix(target: UUID, prefix: Component) {
        // Set player prefix
    }

    override fun formatMessage(target: UUID, format: String, message: Component): Component {
        // Format chat message
        return Component.text()
            .append(prefix)
            .append(message)
            .build()
    }
}
For complete implementation examples, check our GitHub repository.

Best Practices

  1. Group Management
    • Use consistent prefix/suffix styles
    • Set appropriate group priorities
    • Document group hierarchies
  2. Performance
    • Cache group data when possible
    • Use async operations for database queries
    • Minimize chat format complexity