agentsclimarketplace

Commands

Skill MrPippi/MJP-Claude-Skills/docs/purpur/commands

Minecraft Java Plugin Claude Skills

Install
npx -y skills add MrPippi/MJP-Claude-Skills --skill commands

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.9 KB, as published. Nobody here has run it

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 Brigadier system:

Class / MethodPurposeNotes
LifecycleEvents.COMMANDSLifecycle event for command registrationSame as Paper
Commands (registrar)Brigadier command registrarSame as Paper
io.papermc.paper.command.brigadier.*All Brigadier classesIdentical on Purpur

Code Pattern

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"
            );
        }
    );
}

Common Pitfalls

  • 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.

Version Notes

  • Purpur 1.21.1: Command API is 100% inherited from Paper 1.21.1.
  • No plugin.yml differences for command declarations vs Paper.

Related Skills

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.