📄
pasted-code-1793515859063.txt
txt
417 lines
▶
# MASTER DEVELOPMENT PROMPT: IMMORTAL SMP SERVER MANAGEMENT PLUGIN
Act as a senior Minecraft Java plugin developer specializing in Paper API, Java, Bukkit, Inventory GUI systems, NBT, Minecraft Statistics, JSON data storage, and server administration tools.
Build a complete, production-ready Minecraft Paper plugin with a sophisticated inventory-based GUI for managing every player's Minecraft statistics.
## 1. PLUGIN IDENTITY
**Plugin Name:** ProfileDesk
**Plugin Version:** 1.0.0
**Target Server:** Paper 1.21.11
**Java Version:** Java 21
**Language:** Java
**Build System:** Maven
**Plugin Design:** Professional, minimal, discreet server-management utility.
IMPORTANT:
- Do not use names like StatsEditor, CheatMenu, AdminCheat or similar.
- No player-facing messages revealing the internal editing functionality.
- Do not register obvious commands such as /editstats or /statseditor.
- Use a neutral administrative command such as `/profiledesk`.
- Add permission-based access control.
- The GUI must only be accessible to authorized administrators.
## 2. MAIN COMMANDS
Implement:
`/profiledesk`
Opens the main management GUI.
`/pd`
Short alias for opening the same GUI.
`/pd reload`
Reloads plugin configuration.
Permissions:
- `profiledesk.use`
- `profiledesk.admin`
- `profiledesk.reload`
Default permissions must be restricted to OP or explicitly authorized administrators.
## 3. MAIN GUI DESIGN
When an administrator executes `/profiledesk`, open a premium Minecraft inventory GUI.
Title: `Server Management`
Use a 54-slot inventory.
GUI layout:
- Slot 4: Plugin information.
- Slot 10: Player Management.
- Slot 12: Statistics Management.
- Slot 14: Block Statistics.
- Slot 16: Entity Statistics.
- Slot 28: Search Player.
- Slot 30: Online Players.
- Slot 32: Offline Players.
- Slot 34: Recent Changes.
- Slot 49: Reload.
- Slot 53: Close.
Use appropriate Minecraft items, custom names, descriptions, and formatted statistics.
Prevent players from taking, moving or dropping GUI items.
## 4. PLAYER SELECTION GUI
When Player Management is selected:
Display all registered players, including offline players.
Each player should have:
- Player head.
- Username.
- UUID.
- Online/offline status.
- Total blocks mined.
- Total blocks placed.
- Total deaths.
- Total player kills.
- Total mob kills.
- Playtime.
Features:
- Search by username.
- Next and previous pages.
- Sort alphabetically.
- Sort by playtime.
- Sort by blocks mined.
- Sort by deaths.
- Sort by kills.
Clicking a player's head opens their management dashboard.
## 5. PLAYER MANAGEMENT DASHBOARD
Create a dedicated GUI for every selected player.
Display:
1. General Information
2. Block Statistics
3. Item Statistics
4. Entity Statistics
5. Combat Statistics
6. Movement Statistics
7. Custom Statistics
8. Reset Statistics
9. Return to Player List
Show the actual current values of each statistic.
## 6. COMPLETE BLOCK STATISTICS EDITOR
This is the most important feature.
Create a dedicated Block Statistics GUI.
Support every block registered in the Minecraft server registry, including mod/plugin-compatible registered materials where applicable.
Examples:
- Stone
- Cobblestone
- Dirt
- Grass Block
- Oak Log
- Oak Planks
- Diamond Ore
- Deepslate
- Obsidian
- Ancient Debris
- Netherrack
- Sand
- Gravel
- Glass
- All other registered block materials.
For every block, support:
**BLOCKS MINED**
- Display current mined count.
- Set exact value.
- Increase value.
- Decrease value.
- Reset to zero.
**BLOCKS PLACED**
- Display current placed count.
- Set exact value.
- Increase value.
- Decrease value.
- Reset to zero.
When an administrator clicks a block:
Open an action GUI containing:
- Current Mined Count
- Current Placed Count
- Set Mined Count
- Set Placed Count
- Add Mined Count
- Add Placed Count
- Subtract Mined Count
- Subtract Placed Count
- Reset Mined Count
- Reset Placed Count
Use an anvil GUI or another reliable input mechanism for entering numerical values.
Validate all numbers. Do not allow negative values or integer overflow.
## 7. OTHER STATISTICS EDITORS
Implement complete editors for the following categories.
### A. Item Statistics
- Items crafted
- Items used
- Items broken
- Items picked up
- Items dropped
### B. Entity Statistics
- Mobs killed
- Player kills
- Deaths caused by entities
- Entity-specific kills
- Entity-specific deaths
### C. Combat Statistics
- Damage dealt
- Damage taken
- Damage blocked
- Number of deaths
- Player kills
### D. Movement Statistics
- Distance walked
- Distance sprinted
- Distance swum
- Distance flown
- Distance fallen
- Distance climbed
- Distance by boat
- Distance by minecart
- Distance by horse
### E. General Statistics
- Playtime
- Time since last death
- Jumps
- Interactions
- Fishing
- Raids won
- Animals bred
- Villager interactions
Support every applicable statistic exposed by the target Paper/Minecraft version, not only the examples listed above.
## 8. STATISTIC EDITING INTERFACE
Every statistic must support:
- View current value.
- Set exact value.
- Add a custom amount.
- Subtract a custom amount.
- Reset individual statistic.
- Return to previous menu.
Use a confirmation GUI before destructive operations.
For example:
Current value: 250
Set value: 500
New value: 500
Display a success message only to the administrator.
## 9. OFFLINE PLAYER SUPPORT
This is mandatory.
The plugin must edit statistics for both online and offline players.
Minecraft stores player statistics in JSON files under:
`world/stats/.json`
Implement safe offline editing.
Requirements:
- Read the correct UUID.
- Parse the existing JSON.
- Preserve unrelated statistics.
- Modify only requested statistic keys.
- Save the JSON safely.
- Create backups before modifying files.
- Avoid corrupting player data.
- Handle multiple worlds and server configurations correctly.
- Never overwrite an entire player's statistics with incomplete data.
For online players, use the appropriate Bukkit/Paper statistics API wherever possible.
For offline players, implement a safe JSON-based editing system.
Ensure that edited values remain correct after player reconnects and server restarts.
## 10. DATA PERSISTENCE AND SAFETY
Implement:
- Automatic backup before modifications.
- Atomic file writing.
- Error handling.
- UUID-based player identification.
- Thread-safe file operations.
- Validation of statistic keys.
- No accidental modification of unrelated player data.
Store administrative change history in:
`plugins/ProfileDesk/logs/`
Each log entry should include:
- Administrator UUID.
- Target player UUID.
- Statistic modified.
- Previous value.
- New value.
- Timestamp.
- Operation type.
Audit logs must be accessible only to authorized administrators.
## 11. GUI QUALITY REQUIREMENTS
The GUI must look professionally designed.
Use:
- Consistent inventory layouts.
- Category-specific icons.
- Formatted numbers.
- Pagination.
- Search functionality.
- Navigation buttons.
- Confirmation menus.
- Clear item descriptions.
Do not allow:
- Item duplication.
- GUI item extraction.
- Shift-click exploitation.
- Dragging items into GUI.
- Number input exploits.
- Unauthorized access.
- Accidental double execution.
Use appropriate event cancellation and inventory session management.
## 12. CONFIGURATION
Create config.yml with:
- GUI titles.
- GUI item materials.
- Permission settings.
- Backup settings.
- Logging settings.
- Search settings.
- Pagination settings.
- Confirmation requirements.
Allow GUI customization without recompiling the plugin.
## 13. PROJECT STRUCTURE
Use a clean Maven architecture:
ProfileDesk/
├── pom.xml
├── src/main/java/
│ └── com/immortal/profiledesk/
│ ├── ProfileDesk.java
│ ├── commands/
│ ├── gui/
│ ├── managers/
│ ├── statistics/
│ ├── storage/
│ ├── listeners/
│ ├── models/
│ └── utils/
└── src/main/resources/
├── plugin.yml
└── config.yml
## 14. FINAL DELIVERABLES
Provide:
1. Complete Java source code.
2. Fully configured Maven project.
3. Compiled ProfileDesk.jar.
4. Installation instructions.
5. Command and permission documentation.
6. Configuration documentation.
7. Testing instructions.
8. Compatibility confirmation for Paper 1.21.11.
## 15. TESTING REQUIREMENTS
Before declaring the plugin complete, test:
- Opening the main GUI.
- Searching players.
- Online player editing.
- Offline player editing.
- Editing every block's mined statistic.
- Editing every block's placed statistic.
- Editing entity statistics.
- Editing combat statistics.
- Editing movement statistics.
- Setting exact values.
- Adding and subtracting values.
- Resetting individual statistics.
- Restart persistence.
- Reconnection persistence.
- Backup restoration.
- Permission restrictions.
- GUI item duplication prevention.
Do not deliver a prototype with decorative buttons.
Every button must perform its actual advertised operation.
Do not use placeholder values or fake statistics.
**FINAL REQUIREMENT:** Build an actual working plugin, not just a GUI mockup. Prioritize data integrity, complete statistics coverage, offline-player support, and reliable persistence. If any Minecraft statistic cannot be safely modified through the Bukkit API, implement a compatible and validated alternative rather than silently ignoring it.
📄
pasted-code-1793515905262.txt
txt
292 lines
▶
# PROFILEDESK UPDATE 1.1.0: COMPLETE PLAYER PLAYTIME EDITOR
Act as a senior Minecraft Paper plugin developer.
Upgrade the existing ProfileDesk plugin for Paper 1.21.11 and add a complete Player Playtime Management System.
IMPORTANT: Do not create a separate plugin. Integrate this feature into the existing ProfileDesk project without breaking any existing functionality.
## 1. PLAYTIME MANAGEMENT GUI
Add a new option to the main Server Management GUI:
**Player Playtime**
Icon: CLOCK
Description:
- View player total playtime
- Edit player playtime
- Set custom playtime
- Add or subtract playtime
- Reset playtime
Clicking this option opens the Player Selection GUI.
## 2. PLAYER PLAYTIME DASHBOARD
Display all online and offline players.
For each player show:
- Player head
- Username
- UUID
- Online / Offline status
- Current total playtime
- Last known playtime
- Last login information
Support:
- Player search
- Pagination
- Alphabetical sorting
- Highest playtime sorting
- Lowest playtime sorting
Clicking a player opens their Playtime Editor GUI.
## 3. PLAYTIME EDITOR GUI
Create a professional GUI with the following options:
1. View Current Playtime
2. Set Custom Playtime
3. Add Playtime
4. Remove Playtime
5. Reset Playtime
6. View Playtime History
7. Back to Player Dashboard
Show playtime in these formats:
- Days
- Hours
- Minutes
- Seconds
- Total ticks
Example:
Current Playtime:
12 Days, 5 Hours, 30 Minutes
Total: 294 Hours 30 Minutes
## 4. SET CUSTOM PLAYTIME
Allow administrators to set exact playtime.
Examples:
- Set to 1 hour
- Set to 24 hours
- Set to 7 days
- Set to 30 days
- Set to any custom duration
Use a reliable anvil-based input GUI.
Support numerical input and duration units.
Examples:
`500` + HOURS
`30` + DAYS
`120` + MINUTES
`3600` + SECONDS
Validate all inputs and prevent negative values and integer overflow.
## 5. ADD AND REMOVE PLAYTIME
Add Playtime:
Administrator can add any custom duration to the player's existing playtime.
Example:
Previous playtime: 10 hours
Added: 5 hours
New playtime: 15 hours
Remove Playtime:
Administrator can subtract a custom duration.
Example:
Previous playtime: 20 hours
Removed: 5 hours
New playtime: 15 hours
Never allow the resulting playtime to become negative.
## 6. RESET PLAYTIME
Add a reset option.
When clicked, show a confirmation GUI:
Title: Confirm Playtime Reset?
Buttons:
- Confirm Reset
- Cancel
Only reset playtime after administrator confirmation.
## 7. ACTUAL MINECRAFT PLAYTIME DATA
CRITICAL TECHNICAL REQUIREMENT:
Minecraft Java Edition tracks playtime using the statistic:
`minecraft:play_time`
This statistic is stored in player statistics JSON files:
`world/stats/.json`
Implement proper editing of the actual Minecraft playtime statistic.
Do not create a fake display-only playtime counter.
Requirements:
- Correctly read actual player playtime.
- Correctly modify `minecraft:play_time`.
- Support online players.
- Support offline players.
- Preserve all unrelated statistics.
- Save changes safely.
- Ensure changes persist after server restart.
- Ensure reconnecting players do not overwrite edited values.
Use Bukkit/Paper statistics APIs for online players where appropriate.
For offline players, implement safe JSON-based editing.
Understand that Minecraft playtime is stored in ticks:
20 ticks = 1 second
1200 ticks = 1 minute
72000 ticks = 1 hour
1728000 ticks = 1 day
Use long arithmetic internally wherever possible.
If the underlying Minecraft API or storage format imposes an integer limit, validate and clearly report the supported maximum rather than silently overflowing.
## 8. AUTOMATIC PLAYTIME TRACKING
The plugin must not interfere with Minecraft's normal playtime tracking.
After an administrator edits playtime:
- Normal gameplay must continue increasing playtime.
- Edited values must persist.
- No duplicate playtime counting.
- No automatic reset.
- No synchronization conflicts.
Handle online player updates safely.
## 9. PLAYTIME HISTORY
Create an administrator-only history section.
Record:
- Administrator name and UUID
- Target player name and UUID
- Previous playtime
- New playtime
- Amount added or removed
- Operation type
- Date and timestamp
Store history in:
`plugins/ProfileDesk/logs/playtime-history.yml`
## 10. DATA SAFETY
Implement:
- Automatic backup before editing.
- Atomic JSON file writing.
- Error handling.
- UUID-based identification.
- Offline-player support.
- Safe synchronization with online player statistics.
- Protection against duplicate execution.
- Recovery from invalid or corrupted JSON.
Never overwrite unrelated statistics.
## 11. GUI INTEGRATION
Integrate the feature into the existing ProfileDesk interface.
Maintain:
- Existing GUI theme.
- Existing player search.
- Existing permissions.
- Existing navigation.
- Existing audit logs.
Add permission:
`profiledesk.playtime`
Only authorized administrators can edit playtime.
## 12. TESTING REQUIREMENTS
Test all of the following:
1. Set online player playtime.
2. Set offline player playtime.
3. Add playtime.
4. Remove playtime.
5. Reset playtime.
6. Set playtime in seconds.
7. Set playtime in minutes.
8. Set playtime in hours.
9. Set playtime in days.
10. Reconnect after editing.
11. Restart server after editing.
12. Verify normal playtime tracking continues.
13. Verify unrelated statistics remain unchanged.
14. Verify no JSON corruption.
15. Verify permissions.
## 13. FINAL DELIVERABLES
Provide:
- Updated complete Java source code.
- Updated Maven project.
- Compiled ProfileDesk.jar.
- Updated plugin.yml.
- Updated config.yml.
- Installation and update instructions.
- Testing report.
Do not deliver a GUI prototype.
Every playtime editing operation must modify actual Minecraft statistics and persist correctly.
Do not claim completion until online and offline player playtime editing has been tested on Paper 1.21.11.
Create the Maven/Paper project, plugin metadata, and configurable GUI settings.
Implement permission-gated player menus and real online/offline playtime editing with backups and audit history.
Add concise command, permission, configuration, and verification guidance.
Core project and the online/offline playtime editor are in place.
I’m adding actual statistic browsing and editing for the requested block, item, entity, combat, movement, and general categories.
Created the ProfileDesk 1.1.0 Maven project for Java 21 and Paper 1.21.11. It includes permission-gated menus, online/offline playtime editing, statistic editors for block, item, entity, combat, movement, and general categories, plus backups and administrator history.
Not fully verified: I haven’t run the requested live Paper tests. The player list doesn’t yet show aggregate block/death/kill totals or sort by those values, and custom plugin/mod materials beyond XSeries’ material catalog aren’t included. Block placement is represented by Minecraft’s minecraft:used statistic and labeled “Placed/used.”
To produce the jar in Kodari, click Compile in the desktop top bar, or on phone tap ⋮ → Compile Project. Click Compile in the window, then Download after it succeeds. I can’t certify restart, reconnect, or offline-edit persistence until those are tested on a Paper server.
📄
pasted-code-1793519771670.txt
txt
353 lines
▶
# PROFILEDESK 1.2.0 - COMPLETE MINECRAFT PLAYER DATA STATISTICS INTEGRATION
Act as a senior Minecraft Paper 1.21.11 plugin developer, Java engineer and Minecraft player-data storage specialist.
I am providing the existing ProfileDesk plugin.
Your task is to FIX and UPGRADE its existing Statistics Editor so that every supported editable Minecraft statistic is modified and permanently saved inside the ACTUAL Minecraft player statistics files.
This is a critical requirement.
## 1. PRIMARY REQUIREMENT: ACTUAL MINECRAFT PLAYER DATA
Minecraft stores player statistics in:
`/stats/.json`
The plugin MUST modify these actual Minecraft statistics files.
Examples:
`world/stats/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.json`
Do NOT store editable vanilla statistics in:
- plugins/ProfileDesk/stats.yml
- plugins/ProfileDesk/playerdata.yml
- Custom statistics databases
- Separate JSON files
- Temporary plugin variables
The actual Minecraft statistics JSON must contain the updated values.
Custom plugin-only statistics are allowed only when Minecraft does not provide an equivalent vanilla statistic.
## 2. /PD COMMAND INTEGRATION
Keep the existing command:
`/pd`
When an administrator executes `/pd`, open the main ProfileDesk GUI.
Add these functional options:
- Player Management
- Statistics Management
- Block Statistics
- Item Statistics
- Entity Statistics
- Combat Statistics
- Movement Statistics
- General Statistics
- Playtime Management
Do not create separate commands for every statistics category.
All management must be accessible through `/pd` and its GUI.
Preserve existing permissions and add appropriate administrator permissions.
## 3. ACTUAL STATISTICS JSON EDITING
Implement a reliable Minecraft statistics JSON editor.
Understand Minecraft's actual JSON structure.
Example:
{
"stats": {
"minecraft:mined": {
"minecraft:stone": 500,
"minecraft:diamond_ore": 20
},
"minecraft:custom": {
"minecraft:jump": 1000,
"minecraft:deaths": 5,
"minecraft:play_time": 72000
}
},
"DataVersion": 4189
}
This is an illustrative structure. Do not hardcode its DataVersion. Preserve the actual existing DataVersion and all unrelated fields.
Implement correct JSON category and statistic identifiers according to Minecraft 1.21.11.
The plugin must:
- Read the actual player JSON file.
- Parse existing statistics.
- Modify the requested statistic.
- Preserve every unrelated statistic.
- Save the modified JSON to the original file.
- Re-read the file to verify the new value.
- Report success only after successful verification.
## 4. ONLINE PLAYER SUPPORT
For online players:
- Use Bukkit/Paper APIs to read and update supported statistics.
- Synchronize API changes with actual player statistics storage.
- Ensure server saves cannot overwrite the administrator's changes.
- Use the correct server-thread operations.
- Save changes safely.
- Verify the final JSON file contains the edited value.
Do not simply edit a JSON file while Minecraft is holding outdated statistics in memory.
Do not use two conflicting write methods.
## 5. OFFLINE PLAYER SUPPORT
For offline players:
- Identify the correct UUID.
- Locate the actual primary world's stats directory.
- Open the correct UUID JSON file.
- Modify the requested statistic.
- Preserve the existing JSON structure.
- Save atomically.
- Verify the saved value.
When the player reconnects, Minecraft must load the updated value without reverting it.
Support offline players even if they have not joined recently.
Never identify players using usernames when UUID is available.
## 6. COMPLETE BLOCK STATISTICS EDITOR
Inside `/pd` GUI, provide a complete block statistics editor.
Display all applicable registered block materials.
For each block, show:
- Current blocks mined.
- Current blocks placed, if tracked by the plugin's separate custom tracker.
- Set mined value.
- Add mined value.
- Subtract mined value.
- Reset mined value.
IMPORTANT:
Vanilla Minecraft's mined statistics use:
`minecraft:mined`
Block placement is not equivalent to `minecraft:used`.
Do not falsely write placement counts into mined or used statistics.
If tracking blocks placed, implement BlockPlaceEvent and store the custom counter separately. Clearly label it as a custom statistic.
## 7. ALL OTHER VANILLA STATISTICS
Implement actual Minecraft statistic editing for:
### Blocks
- All applicable mined block statistics.
### Items
- Used.
- Crafted.
- Broken.
- Picked up.
- Dropped.
### Entities
- Killed.
- Killed by.
### Combat
- Damage dealt.
- Damage taken.
- Deaths.
- Player kills.
### Movement
- Walked.
- Sprinting.
- Swimming.
- Flying.
- Falling.
- Climbing.
- Boating.
- Minecart travel.
- Horse travel.
### General
- Jumps.
- Playtime.
- Time since death.
- Time since rest.
- Interactions.
- Fishing.
- Raids won.
- Animals bred.
Use the actual Bukkit Statistic enum and its correct category/type.
Do not invent statistic identifiers.
Check which statistics are supported by Paper 1.21.11.
## 8. PLAYTIME MUST ALSO USE ACTUAL MINECRAFT DATA
The existing Playtime Editor must remain functional.
Use:
`minecraft:play_time`
Convert durations correctly:
20 ticks = 1 second.
1200 ticks = 1 minute.
72000 ticks = 1 hour.
1728000 ticks = 1 day.
Edit the actual `minecraft:custom` statistics entry.
Ensure normal playtime tracking continues after editing.
## 9. GUI WORKFLOW
Example:
Administrator executes:
`/pd`
Main Menu opens.
Select Player Management.
Select a player.
Player Dashboard opens.
Select Statistics Management.
Select Block Statistics.
Select Stone.
Stone Editor opens.
Display:
Current Mined: 500
Buttons:
- Set Mined
- Add Mined
- Subtract Mined
- Reset Mined
- Back
Administrator enters 1000.
The plugin updates the actual Minecraft statistics JSON.
New value: 1000.
The next time the player checks their Minecraft statistics, the updated value must be reflected.
## 10. FILE SAFETY
Before every edit:
- Create a backup of the original JSON.
- Preserve DataVersion.
- Preserve unrelated categories.
- Preserve unrelated statistic keys.
- Validate JSON.
- Write using a temporary file and atomic replacement.
- Verify the final saved value.
Never delete or recreate the complete player JSON file.
Never overwrite player advancements, inventory, XP, location or other player data.
## 11. DEBUGGING AND LOGGING
Add detailed internal logs.
Example:
[ProfileDesk] Target UUID: ...
[ProfileDesk] Statistic: minecraft:mined
[ProfileDesk] Key: minecraft:stone
[ProfileDesk] Previous value: 500
[ProfileDesk] New value: 1000
[ProfileDesk] Actual stats JSON updated successfully.
[ProfileDesk] Verification successful.
If saving fails, show the actual error to the administrator.
Never display a false success message.
## 12. CRITICAL TESTS
Test on an actual Paper 1.21.11 server:
1. Edit online player stone mined statistic.
2. Edit offline player stone mined statistic.
3. Edit diamond ore mined statistic.
4. Edit item crafted statistic.
5. Edit item used statistic.
6. Edit entity kill statistic.
7. Edit deaths statistic.
8. Edit movement statistics.
9. Edit actual Minecraft playtime.
10. Restart the server.
11. Reconnect the edited player.
12. Check the actual UUID JSON file.
13. Verify Minecraft loads the new values.
14. Verify no unrelated statistics were changed.
Do not consider a test successful merely because the GUI displays the new number.
The actual Minecraft JSON file and Bukkit/Paper API must both return the updated value.
## 13. FINAL DELIVERABLE
Provide:
- Updated complete Maven source project.
- ProfileDesk-1.2.0.jar.
- Updated GUI.
- Working `/pd` command.
- Actual Minecraft JSON integration.
- Online and offline player support.
- Automatic backups.
- Debug logs.
- Testing report.
FINAL RULE:
The actual Minecraft player statistics JSON file is the source of truth for vanilla statistics.
Do not replace actual Minecraft statistics with custom plugin counters.
Do not deliver a mockup.
Do not claim completion without verifying actual saved data on Paper 1.21.11.
Trace the existing
/pdcommand, GUI flow, and statistics/playtime editor.Implement verified edits to Minecraft’s UUID statistics JSON for online and offline players.
Connect the requested statistics categories and editing workflow to the existing GUI.
Add safe backups, atomic writes, and truthful diagnostics; validate what can be verified in this project.
The existing editor writes JSON for online players and then saves the Bukkit state, allowing the save to overwrite the edit; block “placed/used” entries also misuse vanilla
minecraft:used.I’m separating online edits (Bukkit API → server save → JSON/API verification) from offline edits (backup → atomic JSON update → verification), then routing playtime through the same safe path.
I’ll keep the existing
/pdGUI and permissions, remove the misleading block statistic, and update the project version to 1.2.0.
package com.immortal.profiledesk;
import com.immortal.profiledesk.commands.ProfileDeskCommand;
import com.immortal.profiledesk.gui.MenuManager;
import com.immortal.profiledesk.listeners.GuiListener;
import com.immortal.profiledesk.storage.PlaytimeStore;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
public final class ProfileDesk extends JavaPlugin {
private PlaytimeStore playtimeStore;
private MenuManager menuManager;
@Override
public void onEnable() {
saveDefaultConfig();
playtimeStore = new PlaytimeStore(this);
menuManager = new MenuManager(this, playtimeStore);
getServer().getPluginManager().registerEvents(new GuiListener(menuManager), this);
ProfileDeskCommand command = new ProfileDeskCommand(this, menuManager);
getCommand("profiledesk").setExecutor(command);
getCommand("profiledesk").setTabCompleter(command);
Bukkit.getLogger().info("ProfileDesk enabled.");
}
public PlaytimeStore getPlaytimeStore() {
return playtimeStore;
}
public MenuManager getMenuManager() {
return menuManager;
}
}