## PROMPT for DonutHologram
```
Create a Minecraft Paper plugin called "DonutHologram" with the following specifications:
### PROJECT OVERVIEW
DonutHologram is a premium placeholder plugin that provides leaderboard and player statistics placeholders for other plugins to use. It is NOT a visual hologram plugin - it only provides placeholder data. Other plugins (like HolographicDisplays, DecentHolograms, etc.) will display the data. The plugin requires PlaceholderAPI as a dependency.
### PROJECT STRUCTURE
- Use Maven as the build tool
- GroupId: `com.donuthologram`
- ArtifactId: `donuthologram`
- All class files MUST use meaningless single-letter or nonsense names to prevent reverse engineering (A.java, B.java, AB.java, XYZ.java, etc.)
- Package structure should be obfuscated with confusing relationships
- All methods and variables must use meaningless names
- Use string obfuscation (store sensitive strings as Base64 or char arrays)
### LICENSE SYSTEM INTEGRATION
Create a license validation system that checks against this API endpoint:
- URL: `https://thrahtcbkuucisztuvmd.supabase.co/functions/v1/validate-license`
- Method: POST
- Headers: Content-Type: application/json
- Request body: `{"plugin_name": "DonutHologram", "license_key": "[KEY_FROM_CONFIG]"}`
- Response: `{"valid": true}` or `{"valid": false}`
On server startup:
1. Validate the license against the API
2. If valid: Cache the result and proceed with plugin initialization
3. If invalid: Disable the plugin, log error, and prevent all functionality
4. If API is unreachable: Use cached validation if available, otherwise disable after 3 retries
### DEPENDENCIES
- PlaceholderAPI (required)
- Vault (optional, for economy)
- Any statistics plugin or built-in tracking
### PLUGIN FUNCTIONALITY
**What DonutHologram DOES:**
- Provides placeholder data for leaderboards (top 100 players)
- Provides player-specific statistics placeholders
- Tracks player data: balance, playtime, mob kills, deaths, player kills, blocks placed, blocks broken
- Formats numbers (K, M, B, T) and time (d, h, m)
- Works with any hologram plugin via PlaceholderAPI
**What DonutHologram DOES NOT DO:**
- Does NOT display visual holograms
- Does NOT create hologram entities
- Does NOT render anything in-game
- Only provides data via PlaceholderAPI
### PLACEHOLDERS (All start with donutholo_)
**Leaderboard Placeholders (Name):**
- `%donutholo_balance_name_1-100%` - Player name at position 1-100 for top balance
- `%donutholo_playtime_name_1-100%` - Player name for top playtime
- `%donutholo_mobs_killed_name_1-100%` - Player name for top mob kills
- `%donutholo_deaths_name_1-100%` - Player name for most deaths
- `%donutholo_kills_name_1-100%` - Player name for top player kills
- `%donutholo_blocks_placed_name_1-100%` - Player name for top blocks placed
- `%donutholo_blocks_broken_name_1-100%` - Player name for top blocks broken
**Leaderboard Placeholders (Amount):**
- `%donutholo_balance_amount_1-100%` - Balance amount at position
- `%donutholo_balance_amount_1-100_formatted%` - Formatted balance (1.5K, 2.3M, etc.)
- `%donutholo_playtime_amount_1-100%` - Playtime in minutes at position
- `%donutholo_playtime_amount_1-100_formatted%` - Formatted playtime (1d 5h 30m)
- `%donutholo_mobs_killed_amount_1-100%` - Mob kills count at position
- `%donutholo_mobs_killed_amount_1-100_formatted%` - Formatted mob kills (1.5K)
- `%donutholo_deaths_amount_1-100%` - Death count at position
- `%donutholo_deaths_amount_1-100_formatted%` - Formatted deaths
- `%donutholo_kills_amount_1-100%` - Player kills count at position
- `%donutholo_kills_amount_1-100_formatted%` - Formatted player kills
- `%donutholo_blocks_placed_amount_1-100%` - Blocks placed count at position
- `%donutholo_blocks_placed_amount_1-100_formatted%` - Formatted blocks placed
- `%donutholo_blocks_broken_amount_1-100%` - Blocks broken count at position
- `%donutholo_blocks_broken_amount_1-100_formatted%` - Formatted blocks broken
**Leaderboard Position Placeholders:**
- `%donutholo_balance_position%` - Player's position in balance leaderboard
- `%donutholo_playtime_position%` - Player's position in playtime leaderboard
- `%donutholo_mobs_killed_position%` - Player's position in mob kills leaderboard
- `%donutholo_deaths_position%` - Player's position in deaths leaderboard
- `%donutholo_kills_position%` - Player's position in kills leaderboard
- `%donutholo_blocks_placed_position%` - Player's position in blocks placed leaderboard
- `%donutholo_blocks_broken_position%` - Player's position in blocks broken leaderboard
**Player's Own Statistics (Raw):**
- `%donutholo_balance_me%` - Player's balance (raw)
- `%donutholo_playtime_me%` - Player's playtime in minutes
- `%donutholo_mobs_killed_me%` - Player's mob kills
- `%donutholo_deaths_me%` - Player's death count
- `%donutholo_kills_me%` - Player's player kills
- `%donutholo_blocks_placed_me%` - Player's blocks placed
- `%donutholo_blocks_broken_me%` - Player's blocks broken
**Player's Own Statistics (Formatted):**
- `%donutholo_balance_me_formatted%` - Formatted balance
- `%donutholo_playtime_me_formatted%` - Formatted playtime
- `%donutholo_mobs_killed_me_formatted%` - Formatted mob kills
- `%donutholo_deaths_me_formatted%` - Formatted deaths
- `%donutholo_kills_me_formatted%` - Formatted player kills
- `%donutholo_blocks_placed_me_formatted%` - Formatted blocks placed
- `%donutholo_blocks_broken_me_formatted%` - Formatted blocks broken
**General Placeholders:**
- `%donutholo_player_name%` - Player's name (useful for leaderboard displays)
### CONFIGURATION FILE (config.yml)
```yaml
# ============================================
# DonutHologram Configuration
# ============================================
# License Configuration
license:
key: "YOUR-LICENSE-KEY-HERE"
# Permissions
# none
# Amount Format Settings
amount-format:
k: "K"
m: "M"
b: "B"
t: "T"
# Playtime Format Settings
playtime-format:
d: "d"
h: "h"
m: "m"
# N/A Placeholder (when no data available)
n/a:
- "N/A"
# Data Tracking Settings
tracking:
# Track player playtime (in minutes)
track_playtime: true
# Track mob kills
track_mob_kills: true
# Track deaths
track_deaths: true
# Track player kills (PVP)
track_player_kills: true
# Track blocks placed
track_blocks_placed: true
# Track blocks broken
track_blocks_broken: true
# Update intervals (in seconds)
leaderboard_update_interval: 60
player_data_save_interval: 300
# Database Settings
database:
type: "json" # json or sqlite
# SQLite settings
sqlite_file: "data.db"
# JSON settings
json_folder: "playerdata"
# Leaderboard Settings
leaderboard:
max_entries: 100
cache_duration: 60 # seconds
# Economy Settings (requires Vault)
economy:
enabled: true
currency_name_singular: "coin"
currency_name_plural: "coins"
# Message Settings
messages:
reload_success: "&aDonutHologram configuration reloaded successfully"
license_invalid: "&cInvalid license for DonutHologram. Plugin disabled."
no_permission: "&cYou don't have permission to use this command."
# Debug
debug: false
```
### DATA TRACKING
The plugin must track the following data per player:
- `balance` - from Vault economy
- `playtime` - total minutes played
- `mob_kills` - total mobs killed
- `deaths` - total deaths
- `player_kills` - total player kills
- `blocks_placed` - total blocks placed
- `blocks_broken` - total blocks broken
**Tracking Methods:**
- Listen to EntityDeathEvent for mob kills (distinguish between mobs and players)
- Listen to PlayerDeathEvent for deaths
- Listen to BlockPlaceEvent for blocks placed
- Listen to BlockBreakEvent for blocks broken
- Track playtime using PlayerJoinEvent, PlayerQuitEvent, and a repeating task
- Get balance from Vault API
### COMMANDS
| Command | Description | Permission |
|---------|-------------|------------|
| `/donuthologram reload` | Reload configuration | donuthologram.reload |
| `/donuthologram status` | Show plugin and license status | donuthologram.status |
| `/donuthologram top ` | Show top 10 players for a stat | donuthologram.top |
| `/donuthologram stats [player]` | Show player statistics | donuthologram.stats |
### PERMISSIONS
| Permission | Default | Description |
|------------|---------|-------------|
| donuthologram.reload | op | Reload configuration |
| donuthologram.status | op | Check plugin status |
| donuthologram.top | true | View leaderboard top |
| donuthologram.stats | true | View player statistics |
### NUMBER FORMATTING
Format numbers using suffixes:
- 1,000 = 1K
- 1,000,000 = 1M
- 1,000,000,000 = 1B
- 1,000,000,000,000 = 1T
- Round to 1 decimal place (1.5K, 2.3M)
### TIME FORMATTING
Format playtime from minutes to readable format:
- 60 minutes = 1h
- 1440 minutes = 1d
- Example: 1d 5h 30m
- Use configurable suffixes
### REQUIREMENTS
- Paper 1.20+
- Java 17+
- PlaceholderAPI (required dependency)
- Vault (optional, for economy)
### FOLIA SUPPORT
- Must fully support Folia servers
- Use Folia-compatible scheduler methods
- Thread-safe data access
### PLUGIN.YML
```yaml
name: DonutHologram
version: 1.0.0
main: com.donuthologram.X
api-version: 1.20
description: Premium placeholder plugin for leaderboards and player statistics
author: DonutDevelopment
website: https://donuthologram.com
folia-supported: true
depend:
- PlaceholderAPI
softdepend:
- Vault
commands:
donuthologram:
description: Main DonutHologram command
aliases: [dhologram, dholo]
usage: /
permissions:
donuthologram.reload:
description: Allows reloading config
default: op
donuthologram.status:
description: Allows checking plugin status
default: op
donuthologram.top:
description: Allows viewing leaderboard
default: true
donuthologram.stats:
description: Allows viewing statistics
default: true
```
### OBFUSCATION REQUIREMENTS
- Class names: Single letters or random strings (X, Y, Z, AA, AB, AC)
- Method names: Meaningless names (a, b, c, x1, x2)
- Variable names: Single letters or random strings
- String obfuscation: Store sensitive strings as Base64
- Reflection: Use reflection for critical logic
### OUTPUT REQUIREMENTS
Generate the complete:
1. pom.xml
2. All Java source files with obfuscated names (X.java, Y.java, Z.java, etc.)
3. config.yml
4. plugin.yml
The plugin must compile successfully with `mvn clean package` and work on Paper, Purpur, and Folia servers (1.20+).
```