docs/purpur/storage/SKILL.md
# Storage Skill — Purpur ## Purpose Reference this skill when implementing storage in a Purpur-targeted plugin. Purpur does not add new storage APIs — all Paper storage mechanisms work identically. This skill documents the `purpur.yml` config file integration and cross-links to Paper storage guides. ## When to Use This Skill - Reading Purpur-specific settings from `purpur.yml` - Storing plugin data on a Purpur server - Deciding between config, PDC, and database on Purpur ## API Quick Referenc
npx skillsauth add MrPippi/MPS docs/purpur/storageInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Reference this skill when implementing storage in a Purpur-targeted plugin. Purpur does not add new storage APIs — all Paper storage mechanisms work identically. This skill documents the purpur.yml config file integration and cross-links to Paper storage guides.
purpur.yml| Class / Method | Purpose | Notes |
|---------------|---------|-------|
| Same as Paper | All Paper storage APIs apply | FileConfiguration, PersistentDataContainer, HikariCP |
| purpur.yml | Purpur's server config | Not directly accessible via API — read via config.yml or own files |
All Paper storage patterns work unchanged on Purpur. See:
purpur.yml from a Plugin (Advanced)Purpur does not expose purpur.yml values through its API. If you need to read Purpur config values:
import org.bukkit.configuration.file.YamlConfiguration;
import java.io.File;
// NOT recommended for production — Purpur may rename keys without notice
File purpurYml = new File("purpur.yml"); // server root, not plugin folder
YamlConfiguration purpurConfig = YamlConfiguration.loadConfiguration(purpurYml);
int afkTimeout = purpurConfig.getInt("gameplay-mechanics.afk-timeout", 0);
Warning: Reading
purpur.ymldirectly is fragile and couples your plugin to Purpur's internal config format. Prefer storing your own settings in your plugin'sconfig.ymland letting server admins cross-referencepurpur.ymlmanually.
purpur.yml directly in production: The file format may change across Purpur versions. Use your plugin's own config.yml for plugin settings.PersistentDataType.LIST (Paper 1.21 addition) is available in Purpur 1.21.1.development
透過 NMS Scoreboard/Objective/Team API 操作 sidebar、tablist 顯示名稱與計分板(Paper NMS + Mojang-mapped)/ Operate sidebar, tablist, and scoreboard via NMS Scoreboard/Objective/Team API
research
操作 GameProfile 進行 skin 注入,用於 NPC 外觀設定與假玩家實體(Paper NMS + Mojang-mapped)/ Manipulate GameProfile for skin injection used in NPC appearance and fake player entities
tools
透過 ClientboundLevelParticlesPacket 實現進階 NMS 粒子效果:客戶端專屬、大量粒子、自定義參數(Paper NMS + Mojang-mapped)/ Advanced NMS particle effects via ClientboundLevelParticlesPacket with per-client and bulk support
documentation
直接操作 CompoundTag 讀寫物品、實體、方塊實體的 NBT 資料(Paper NMS + Mojang-mapped)/ Read and write NBT data on items, entities, and block entities via CompoundTag