Skip to content

Statistics.md

Fragmer2 edited this page Apr 8, 2026 · 3 revisions

Statistics & Achievements

Overview

The plugin tracks player progress and awards achievements with XP rewards. All data is stored per-UUID and persists across sessions.

Enable or disable the system in config:

statistics:
  enabled: true
  achievements:
    enabled: true

Toggle live: /togglefeature statistics


Tracked Statistics

Stat What it counts
Chests opened Total and per tier (Common / Rare / Legendary)
Legendary items found Items found in chests — not from /getlegendaryitems
Guardians killed Any guardian mob killed by the player
Summoner apples used Any apple type consumed that results in a chest
Score Calculated from all actions above

Commands

/mystats

Aliases: /stats · Permission: spawnchest.use

--- Your Statistics ---
Chests opened  ·  47
  Common  ·  25
  Rare  ·  18
  Legendary  ·  4
Legendary items  ·  3
Guardians killed  ·  12
Apples used  ·  2
Score  ·  5500
Rank  ·  #4
-------------------

/leaderboard

Aliases: /lb, /top · Permission: spawnchest.use

Shows top 10 players by score. Rank is also shown at the bottom of /mystats.


Achievements

Achievement List

Achievement Requirement XP
First Find Open 1 chest 50
Treasure Hunter Open 10 chests 200
Chest Master Open 50 chests 500
Legendary Finder Find 1 legendary item 300
Guardian Slayer Kill 25 guardians 400

Notification on unlock

Chat:

§6✦ §f<Player> §7unlocked §eChest Master

Title on screen:

§6Achievement Unlocked
§eChest Master

Server broadcast (if features.broadcasts.achievement-announcement: true)


Configuration

statistics:
  enabled: true
  achievements:
    enabled: true

XP rewards are defined in language files under the achievements section.


Data File

plugins/SpawnChestPlugin/statistics.yml

Saved every 5 minutes, on player logout, and on server shutdown. Keyed by player UUID — renames do not affect data.

Manual Reset

To reset a player's stats:

  1. Stop server
  2. Open statistics.yml
  3. Delete the player's UUID block
  4. Start server

Troubleshooting

Stats not tracking

  • /chestconfig get statistics.enabled — must be true
  • Check disk write permissions for statistics.yml

Achievement didn't unlock

  • Check requirements in /mystats
  • Confirm statistics.achievements.enabled: true

Leaderboard empty

  • At least one player must have opened a chest
  • Statistics system must be enabled

Clone this wiki locally