DZTablist - Complete Minecraft Tablist Plugin Implementation
Core Specifications
- Plugin Name: DZTablist
- Build System: Gradle (simple configuration)
- Package Structure: online.demonzdevelopment
- Main Class: online.demonzdevelopment.DZTablist
- Target Platform: PaperMC 1.21.1 (exclude Spigot-only APIs)
- Java Version: 21
- Plugin Version: 1.0.0
- Author: DemonZ Development
- Hard Dependencies: LuckPerms, PlaceholderAPI
Feature Implementation Requirements
#### 1. Header & Footer System
- Support per-world and per-server configurations
- Per-group support via LuckPerms integration
- Per-player overrides with highest priority
- Conditional display system (enable/disable based on placeholder values, permissions, world checks)
- Animated text support with configurable refresh intervals
- MiniMessage format support for RGB gradients and colors
- Automatic color downsampling for legacy clients (<1.16)
- Configuration structure: YAML with separate sections for worlds, groups, players
#### 2. Name Tags System
- Configurable prefix and suffix with unlimited length
- Per-world, per-server, per-group, per-player support with priority ordering
- Complete invisibility option (hide nametags entirely)
- Collision rule control (ALWAYS, NEVER, PUSH_OWN_TEAM, PUSH_OTHER_TEAMS)
- 1.8.x client bug compensation for invisible player nametags [3]
- Anti-override protection against other plugins using packet priority
- Team-based implementation using Minecraft scoreboard teams
- Conditional disable based on placeholder output or permission checks
#### 3. Sorting System
- Primary sorting by LuckPerms permission group with configurable weight values
- Secondary sorting by permission nodes (string-based ordering)
- Numeric placeholder sorting (ascending/descending)
- Alphabetical placeholder sorting (A-Z, Z-A)
- Pre-defined placeholder value sorting with custom order mappings
- Multi-layer sorting combination support
- Case-sensitive/insensitive toggle option
- Update on permission change, group change, placeholder refresh
- Configuration: priority-based sorting rules with fallback chains
#### 4. Tablist Formatting
- Prefix, name, suffix customization with unlimited character support
- Per-world, per-server, per-group, per-player configurations
- Conditional display rules with AND/OR logic operators
- Anti-override protection via packet interception priority
- Dynamic updates on permission/group changes
- Support for relational placeholders (viewer-target pair) [4][5]
- Configuration structure: hierarchical YAML with inheritance system
#### 5. Playerlist Objective (Right-side Display)
- Numeric placeholder display for all versions
- Text display support for 1.20.3+ clients
- Heart display option with half-heart precision
- Conditional disable with placeholder/permission checks
- Real-time updates based on refresh intervals
- Configuration: objective type, placeholder, update interval, display conditions
#### 6. Belowname Display
- Numeric placeholder for <1.20.3 clients
- Text display for 1.20.3+ clients
- Configurable display text/title
- Conditional enable/disable system
- Automatic version detection and appropriate rendering
- Configuration: display type, placeholder, conditions, refresh rate
#### 7. Bossbar System
- Configurable text with PlaceholderAPI support and MiniMessage formatting
- Progress bar with placeholder-based values (0.0-1.0 range)
- Color options: PINK, BLUE, RED, GREEN, YELLOW, PURPLE, WHITE
- Style options: SOLID, SEGMENTED_6, SEGMENTED_10, SEGMENTED_12, SEGMENTED_20
- Conditional display rules with complex logic support
- Announcement system with timed display duration
- Toggle command with permission nodes and customizable messages
- Persistent toggle state storage (YAML or MySQL)
- Configuration: multiple bossbar definitions with priority system [3]
#### 8. Global Playerlist (Proxy Support)
- Display players from all proxy servers in tablist
- Server group configuration for shared playerlists
- Isolated server support (independent tablists)
- Universal visibility servers (see all players)
- Vanish plugin compatibility with priority-based detection
- Spectator mode display for players on other servers
- Requires proxy-side plugin component for cross-server communication
- Configuration: server groups, isolation rules, spectator display
#### 9. Layout System (80-slot Customization)
- Full 80-slot tablist customization (4 columns x 20 rows)
- Static slots with custom text and player head skins (UUID or texture value)
- Dynamic player group slots with conditional sorting
- Multiple layout support with condition-based switching
- Per-world, per-permission, per-placeholder layouts
- Slot assignment configuration: fixed positions, dynamic filling
- Player head rendering with offline UUID support
- Configuration: layout definitions with slot mappings [3]
#### 10. Scoreboard System
- Display up to 30 lines (1.8+ clients: 15 lines, 1.13+: 30 lines)
- Static number display option (show 0 or custom number instead of 1-15)
- 1.20.3+ right-side text configuration with full character support
- <1.13 clients: 64 characters per line, 1.13+ clients: unlimited
- Conditional scoreboard switching based on placeholder output, permissions, worlds
- Toggle command with customizable messages and permission nodes
- Persistent toggle state across logins (YAML/MySQL storage)
- Automatic detection and priority handling for other plugins' scoreboards
- Multi-world scoreboard support with per-world configurations
- Configuration: scoreboard definitions with line arrays, conditions, world mappings [3][6]
#### 11. Per-World Playerlist
- Display only players from current world in tablist
- World grouping configuration for shared player visibility
- Universal visibility worlds (players see everyone)
- Permission-based override to see all players in all worlds
- Configuration: world groups, universal worlds, permission nodes [7]
#### 12. API Implementation Create comprehensive developer API with following methods:
- Tablist formatting:
setPrefix(Player, String), setName(Player, String), setSuffix(Player, String) - Header/Footer:
setHeader(Player, String), setFooter(Player, String) - Teams (nametags):
setPrefix(Player, String), setSuffix(Player, String), setVisibility(Player, NameTagVisibility), setCollisionRule(Player, CollisionRule) - Sorting:
setSortingPriority(Player, int), updateSorting(Player) - Scoreboard:
createScoreboard(String id, List<String> lines), showScoreboard(Player, String id), toggleScoreboard(Player), announceScoreboard(Player, String id, int seconds) - Bossbar:
createBossbar(String id, String text, float progress, BarColor, BarStyle), toggleBossbar(Player, String id), announceBossbar(Player, String id, int seconds) - Layout:
createLayout(String id, Map<Integer, SlotConfig>), sendLayout(Player, String id) - Placeholders:
registerPlaceholder(String identifier, int refreshInterval, Function<Player, String>), registerRelationalPlaceholder(String identifier, int refreshInterval, BiFunction<Player, Player, String>) [8] - Provide Javadoc comments for all API methods
- Create example usage code snippets in API documentation
#### 13. Placeholder System
- Internal placeholder system with customizable output values
- Animation system with configurable frame intervals and sequences
- Full PlaceholderAPI integration including relational placeholders
- Relational placeholder support: viewer (first player) and target (second player) [4]
- PlaceholderAPI support for BungeeCord/Velocity proxy
- Conditional placeholders with comparison operators (==, !=, >, <, >=, <=)
- Configuration: placeholder definitions, animations, conditional logic [9][10]
#### 14. Placeholder Output Replacements
- Modify any placeholder output including PlaceholderAPI placeholders
- Exact text replacement with find-replace logic
- Number interval-based replacement (if value between X and Y, show Z)
- Default value fallback if no conditions met
- Original placeholder output usage in replacement text ($original syntax)
- Nested placeholder support (placeholders within placeholders)
- Global replacement system usable in other plugins
- Configuration: replacement rules with priority ordering [11]
#### 15. RGB and Gradient Support
- 10 RGB pattern types: gradient, rainbow, wave, pulse, cycle, fade, shift, spiral, zigzag, random
- 5 gradient pattern types: linear, radial, diagonal, vertical, horizontal
- MiniMessage format parser with full tag support
- Automatic legacy color conversion for <1.16 clients using closest RGB match
- Support in all features: headers, footers, nametags, scoreboards, bossbars, layouts
- Configuration: pattern definitions, color schemes, legacy fallback colors [12]
#### 16. Conditional System
- Placeholder output conditions with numeric comparison and exact string matching
- Permission node conditions with AND/OR logic operators
- Condition combination support: (condition1 AND condition2) OR condition3
- Configurable output for true/false condition states
- Placeholder support in condition output values
- World-based conditions with multi-world matching
- Configuration: condition definitions with logical operators [9]
#### 17. Performance Optimization
- Fully asynchronous processing with no main thread blocking
- TPS impact: zero (all operations on async thread)
- Configurable refresh intervals per feature (header, footer, nametag, scoreboard, bossbar)
- CPU usage monitoring command:
/dztablist cpu showing per-feature breakdown - Disable unwanted features to reduce overhead
- Player count handling: optimized for thousands of concurrent players
- Packet batching to reduce network overhead
- Smart caching system for placeholder values with TTL
- Configuration: refresh intervals, feature toggles, cache settings [13]
#### 18. Additional Features
- MySQL support for groups/users storage with connection pooling
- SQLite fallback for single-server setups
- Error logging to dedicated file (errors.log) instead of console spam
- YAML parser with detailed error messages and line number references
- Configuration validation on startup with fix suggestions
- Misconfiguration detection: circular dependencies, invalid placeholders, missing dependencies
- Reload command with validation:
/dztablist reload - MiniMessage support for MOTD and all text fields
- RGB color and gradient support via MiniMessage docs reference
- Configuration: database settings, logging options, validation rules [14]
Configuration File Structure Requirements
#### Main Config (config.yml)
# Database settings
database:
type: YAML # YAML, MYSQL, SQLITE
mysql:
host: localhost
port: 3306
database: dztablist
username: root
password: password
pool-size: 10
# Performance settings
performance:
async-processing: true
refresh-intervals:
header-footer: 1000 # milliseconds
nametags: 500
scoreboard: 1000
bossbar: 500
tablist-format: 500
cache-ttl: 5000
feature-toggles:
header-footer: true
nametags: true
scoreboard: true
bossbar: true
tablist-format: true
layout: false
per-world-playerlist: false
global-playerlist: false
# Logging settings
logging:
file: errors.log
console-spam-reduction: true
debug-mode: false
# Placeholder settings
placeholders:
papi-support: true
relational-support: true
refresh-interval: 1000
# Anti-override protection
anti-override:
enabled: true
priority: HIGHEST
#### Header/Footer Config (header-footer.yml)
global:
header:
- "<gradient:#FF0000:#00FF00>Welcome to Server</gradient>"
- "%player_name%"
footer:
- "Players: %server_online%/%server_max_players%"
- "Ping: %player_ping%ms"
refresh: 1000
worlds:
world:
header:
- "Survival World"
footer:
- "Good luck!"
groups:
admin:
header:
- "<rainbow>Admin Panel</rainbow>"
priority: 10
players:
player-uuid-here:
header:
- "Custom Header"
priority: 20
conditions:
- condition: "%player_world% == lobby"
header:
- "Lobby Server"
footer:
- "Join a game!"
#### Nametags Config (nametags.yml)
global:
prefix: "&7"
suffix: ""
visibility: ALWAYS # ALWAYS, NEVER, HIDE_FOR_OTHER_TEAMS, HIDE_FOR_OWN_TEAM
collision-rule: ALWAYS # ALWAYS, NEVER, PUSH_OWN_TEAM, PUSH_OTHER_TEAMS
invisible: false
groups:
admin:
prefix: "&c[Admin] "
priority: 100
mod:
prefix: "&9[Mod] "
priority: 50
default:
prefix: "&7"
priority: 1
anti-override:
enabled: true
client-bug-fixes:
fix-1-8-invisible-nametags: true
#### Sorting Config (sorting.yml)
rules:
- type: GROUP # GROUP, PERMISSION, PLACEHOLDER_NUMERIC, PLACEHOLDER_ALPHABETIC, CUSTOM
priority: 1
groups:
admin: 100
mod: 50
default: 1
- type: PLACEHOLDER_NUMERIC
priority: 2
placeholder: "%statistic_deaths%"
order: ASCENDING # ASCENDING, DESCENDING
- type: PLACEHOLDER_ALPHABETIC
priority: 3
placeholder: "%player_name%"
order: ASCENDING
case-sensitive: false
#### Tablist Format Config (tablist-format.yml)
global:
prefix: "&7"
name: "%player_name%"
suffix: ""
groups:
admin:
prefix: "&c[Admin] "
priority: 100
players:
player-uuid-here:
prefix: "&6[VIP] "
priority: 50
conditions:
- condition: "%player_gamemode% == CREATIVE"
prefix: "&e[Creative] "
priority: 10
#### Playerlist Objective Config (playerlist-objective.yml)
enabled: true
type: HEARTS # HEARTS, NUMBER, TEXT
placeholder: "%player_health%"
text: "HP" # For 1.20.3+
refresh: 1000
conditions:
- "%player_world% != lobby"
#### Belowname Config (belowname.yml)
enabled: true
title: "Level"
placeholder: "%player_level%"
refresh: 1000
conditions:
- "%player_world% == survival"
#### Bossbar Config (bossbar.yml)
bossbars:
welcome:
text: "<gradient:#FF0000:#00FF00>Welcome %player_name%!</gradient>"
progress: "%player_health% / 20"
color: RED # PINK, BLUE, RED, GREEN, YELLOW, PURPLE, WHITE
style: SOLID # SOLID, SEGMENTED_6, SEGMENTED_10, SEGMENTED_12, SEGMENTED_20
conditions:
- "%player_world% == spawn"
refresh: 500
announcement:
text: "Event starting soon!"
progress: "1.0"
color: YELLOW
style: SEGMENTED_10
duration: 10 # seconds for announcements
toggle:
command: "/bossbar toggle"
permission: "dztablist.bossbar.toggle"
messages:
enabled: "&aBosbosbar enabled!"
disabled: "&cBossbar disabled!"
remember-choice: true
#### Scoreboard Config (scoreboard.yml)
scoreboards:
default:
title: "<gradient:#FF0000:#00FF00>Server Name</gradient>"
lines:
- ""
- "&7Player: &f%player_name%"
- "&7Rank: &f%vault_rank%"
- "&7Ping: &f%player_ping%ms"
- ""
- "&7Online: &f%server_online%"
- ""
refresh: 1000
show-numbers: false # Show 1-15 or custom number
custom-number: 0
right-side-text: # 1.20.3+ only
- "HP: %player_health%"
world-specific:
world: survival
title: "Survival World"
lines:
- "Deaths: %statistic_deaths%"
- "Kills: %statistic_player_kills%"
toggle:
command: "/scoreboard toggle"
permission: "dztablist.scoreboard.toggle"
messages:
enabled: "&aScoreboard enabled!"
disabled: "&cScoreboard disabled!"
remember-choice: true
auto-detection:
other-plugins: true
priority: LOW
#### Per-World Playerlist Config (per-world-playerlist.yml)
enabled: true
world-groups:
survival-group:
- world
- world_nether
- world_the_end
creative-group:
- creative
universal-worlds:
- lobby
- hub
bypass-permission: "dztablist.seeall"
#### Layout Config (layout.yml)
layouts:
default:
conditions:
- "%player_world% == lobby"
slots:
0:
type: STATIC
text: "&c&lServer Info"
skin-uuid: "069a79f4-44e9-4726-a5be-fca90e38aaf5"
1:
type: PLAYER_GROUP
conditions:
- "%vault_rank% == admin"
sorting: PRIORITY
20-39:
type: PLAYER_GROUP
conditions: []
sorting: ALPHABETIC
40:
type: STATIC
text: "&6Discord"
skin-texture: "ewogICJ0aW1lc3RhbXAiIDogMTY..."
#### Placeholders Config (placeholders.yml)
placeholders:
custom-placeholder:
value: "%player_name%'s custom value"
refresh: 1000
animations:
loading:
frames:
- "Loading."
- "Loading.."
- "Loading..."
interval: 500
relational:
friend-status:
identifier: "%rel_friend_status%"
refresh: 2000
#### Conditional Placeholders Config (conditional-placeholders.yml)
conditionals:
rank-color:
conditions:
- condition: "%vault_rank% == admin"
output: "&c"
- condition: "%vault_rank% == mod"
output: "&9"
default: "&7"
health-bar:
conditions:
- condition: "%player_health% >= 15"
output: "&a■■■■■"
- condition: "%player_health% >= 10"
output: "&e■■■■□"
- condition: "%player_health% >= 5"
output: "&c■■□□□"
default: "&4■□□□□"
#### Placeholder Replacements Config (placeholder-replacements.yml)
replacements:
player-world:
placeholder: "%player_world%"
replacements:
- find: "world"
replace: "Survival"
- find: "world_nether"
replace: "Nether"
- find: "world_the_end"
replace: "The End"
player-ping:
placeholder: "%player_ping%"
number-intervals:
- min: 0
max: 50
output: "&aExcellent"
- min: 51
max: 100
output: "&eGood"
- min: 101
max: 200
output: "&cPoor"
default: "&4Very Poor"
custom-format:
placeholder: "%player_name%"
format: "&b$original&r" # $original = original placeholder value
Build Configuration Requirements
#### build.gradle
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '8.1.1'
}
group = 'online.demonzdevelopment'
version = '1.0.0'
sourceCompatibility = '21'
repositories {
mavenCentral()
maven { url = 'https://repo.papermc.io/repository/maven-public/' }
maven { url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/' }
}
dependencies {
compileOnly 'io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT'
compileOnly 'me.clip:placeholderapi:2.11.6'
compileOnly 'net.luckperms:api:5.4'
implementation 'com.zaxxer:HikariCP:5.1.0' // MySQL connection pooling
implementation 'org.xerial:sqlite-jdbc:3.46.0.0' // SQLite support
implementation 'net.kyori:adventure-text-minimessage:4.17.0' // MiniMessage support
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
shadowJar {
relocate 'com.zaxxer.hikari', 'online.demonzdevelopment.libs.hikari'
relocate 'org.sqlite', 'online.demonzdevelopment.libs.sqlite'
archiveClassifier.set('')
}
build.dependsOn shadowJar
#### plugin.yml
name: DZTablist
version: 1.0.0
main: online.demonzdevelopment.DZTablist
api-version: '1.21'
authors: [DemonZ Development]
description: Advanced Tablist plugin with extensive customization
depend:
- LuckPerms
- PlaceholderAPI
softdepend:
- Vault
commands:
dztablist:
description: Main plugin command
usage: /<command> [reload|cpu|help]
permission: dztablist.admin
bossbar:
description: Toggle bossbar
usage: /<command> toggle
permission: dztablist.bossbar.toggle
scoreboard:
description: Toggle scoreboard
usage: /<command> toggle
permission: dztablist.scoreboard.toggle
permissions:
dztablist.admin:
description: Access to admin commands
default: op
dztablist.bossbar.toggle:
description: Toggle bossbar visibility
default: true
dztablist.scoreboard.toggle:
description: Toggle scoreboard visibility
default: true
dztablist.seeall:
description: See all players in per-world playerlist mode
default: op
Implementation Instructions
- Project Structure: Create proper package hierarchy:
online.demonzdevelopment (main), .api, .config, .managers, .listeners, .commands, .utils, .database
- Manager Classes: Implement manager classes for each feature (HeaderFooterManager, NameTagManager, SortingManager, etc.) with asynchronous task scheduling
- Configuration System: Use YAML configuration with automatic file generation, validation, and hot-reload support
- Database Layer: Implement abstraction layer supporting YAML, MySQL, SQLite with connection pooling and async queries
- Packet Handling: Use ProtocolLib or direct NMS for packet manipulation with version compatibility layer
- PlaceholderAPI Integration: Register expansion with support for relational placeholders using BiFunction<Player, Player, String> [4][5]
- LuckPerms Integration: Use LuckPerms API for group detection, priority calculation, and permission checks
- Event Listeners: Implement listeners for PlayerJoinEvent, PlayerQuitEvent, PlayerChangedWorldEvent, LuckPerms events
- Commands: Create command framework with tab completion, permission checks, and help system
- API Exposure: Create public API interfaces with comprehensive Javadoc and example implementations
- Performance Monitoring: Implement CPU usage tracking per feature with
/dztablist cpu command output
- Error Handling: Log all errors to dedicated file with stack traces, context information, and suggestions
- Testing: Include example configurations demonstrating all features with comments
- Documentation: Generate comprehensive README.md with setup instructions, configuration examples, API usage, and troubleshooting
Output Requirements
Provide complete implementation including:
- All Java source files with proper package structure
- Complete build.gradle with all dependencies
- plugin.yml with all commands and permissions
- All YAML configuration files with example values and comments
- README.md with setup guide, feature documentation, and API examples
- API example code showing how other plugins can integrate
- SQL schema files for MySQL setup (if applicable)
Ensure all code is production-ready, well-commented, follows Java best practices, handles edge cases, includes null checks, uses try-catch blocks, and implements proper resource cleanup. All features must be fully functional and configurable without requiring code modifications.