docs/purpur/commands/SKILL.md
# Commands Skill — Purpur ## Purpose Reference this skill when registering commands on a Purpur server. Purpur inherits the full Paper Brigadier command system — there are no Purpur-specific command APIs. This skill documents any minor differences and cross-links to Paper. ## When to Use This Skill - Setting up commands on a Purpur-targeted plugin - Checking whether Purpur adds any command-related APIs beyond Paper ## API Quick Reference Purpur adds no new command APIs. Use the Paper Brigadi
npx skillsauth add MrPippi/MPS docs/purpur/commandsInstall 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 registering commands on a Purpur server. Purpur inherits the full Paper Brigadier command system — there are no Purpur-specific command APIs. This skill documents any minor differences and cross-links to Paper.
Purpur adds no new command APIs. Use the Paper Brigadier system:
| Class / Method | Purpose | Notes |
|---------------|---------|-------|
| LifecycleEvents.COMMANDS | Lifecycle event for command registration | Same as Paper |
| Commands (registrar) | Brigadier command registrar | Same as Paper |
| io.papermc.paper.command.brigadier.* | All Brigadier classes | Identical on Purpur |
Purpur command registration is identical to Paper. See ../../paper/commands/brigadier-commands.md for the complete pattern.
// Purpur command registration — identical to Paper
import io.papermc.paper.plugin.lifecycle.event.types.LifecycleEvents;
import io.papermc.paper.command.brigadier.Commands;
import com.mojang.brigadier.Command;
@Override
public void onEnable() {
this.getLifecycleManager().registerEventHandler(
LifecycleEvents.COMMANDS,
event -> {
Commands cmds = event.registrar();
cmds.register(
Commands.literal("mypurpurcommand")
.requires(src -> src.getSender().hasPermission("myplugin.command"))
.executes(ctx -> {
ctx.getSource().getSender().sendMessage(
net.kyori.adventure.text.Component.text("Hello from Purpur!")
);
return Command.SINGLE_SUCCESS;
})
.build(),
"A Purpur plugin command"
);
}
);
}
No Purpur-specific command classes: Do not search for org.purpurmc.purpur.command.* — it does not exist. Use io.papermc.paper.command.brigadier.* exclusively.
Testing on Paper then deploying on Purpur: Since Purpur extends Paper, commands work identically. No additional testing specifically for Purpur command registration is required.
plugin.yml differences for command declarations vs Paper.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