Generated banner for Minecraft Plugin Development
Generated logo for Minecraft Plugin Development

Minecraft Plugin Development

GitHubOfficialFirst committed by zixuanjiang332Distributed by GitHub

  • Skill
  • Tool integration
  • Software development
  • MIT
  • No issues found

From the author

Use this skill when building or modifying Minecraft server plugins for Paper, Spigot, or Bukkit, including plugin.yml setup, commands, listeners, schedulers, player state, team or arena systems, persistent progression, economy or profile data, configuration files, Adventure text, and version-safe API usage. Trigger for requests like "build a Minecraft plugin", "add a Paper command", "fix a Bukkit listener", "create plugin.yml", "implement a minigame mechanic", "add a perk or quest system", or "debug server plugin behavior".
— the description by zixuanjiang332

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides guidance for building, modifying, and debugging Minecraft server plugins. It covers the full lifecycle of plugin development, including project structure, command and listener registration, configuration management, state handling, and integration with server APIs. It emphasizes maintaining synchronization between plugin metadata and code, respecting main-thread boundaries, and implementing robust gameplay state management for minigames and persistent progression systems.

What it does

  • Assists with plugin.yml setup and build system configuration for Maven or Gradle.
  • Provides patterns for command execution, tab completion, and event listener registration.
  • Guides the implementation of gameplay state, including arenas, match phases, and player sessions.
  • Supports integration with external APIs and optional dependencies like PlaceholderAPI.
  • Offers strategies for persistent data management, economy systems, and custom progression.
  • Advises on safe thread management and resource cleanup during plugin shutdown.

When to use it

  • When creating a new Minecraft server plugin for Paper, Spigot, or Bukkit.
  • When adding new features like custom commands, listeners, or minigame mechanics.
  • When debugging plugin behavior, lifecycle issues, or state synchronization problems.
  • When refactoring plugin architecture to improve maintainability or performance.
  • When configuring build files, dependencies, or plugin metadata.

Advantages

  • Ensures consistent registration of commands and listeners across the plugin lifecycle.
  • Promotes thread-safe practices when interacting with the Bukkit API.
  • Provides structured patterns for managing complex game states and arena instances.
  • Helps maintain alignment between configuration files and runtime logic.
  • Facilitates clean integration with optional server-side plugins.

Usage examples

“Create a new command for my Paper plugin that allows players to join an arena.”
The agent provides the command registration in plugin.yml, the Java executor class, and the necessary logic to handle player state transitions.
“Fix a listener in my Spigot plugin that is causing issues during server shutdown.”
The agent identifies potential lifecycle hazards and provides code to safely unregister listeners and clean up resources in the onDisable method.
“How should I structure my plugin's configuration to support custom kit rewards?”
The agent suggests a YAML structure for the config file and provides a manager class to load and validate these settings at runtime.
“Help me implement a persistent economy system for my PvP server.”
The agent outlines a service-based architecture for handling player profiles, database interactions, and thread-safe UI updates.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/github/minecraft-plugin-development/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip minecraft-plugin-development.zip -d .agents/skills

Documentation by zixuanjiang332

Minecraft Plugin Development

Use this skill for Minecraft server plugin work in the Paper, Spigot, and Bukkit ecosystem.

This skill is especially useful for gameplay-heavy plugins such as combat systems, wave or boss encounters, war or team modes, arenas, kit systems, cooldown-based abilities, scoreboards, and config-driven game rules.

For grounded implementation patterns drawn from real Paper plugins, load these references as needed:

Scope

  • In scope: Paper, Spigot, Bukkit plugin development

  • In scope: plugin.yml, commands, tab completion, listeners, schedulers, configs, permissions, Adventure text, player state, minigame flow, arena instances, map copies, loot, waves, persistent profiles, perks, buffs, quests, economy, and PvP/PvE game loops

  • In scope: Java-based server plugin architecture, debugging, refactoring, and feature implementation

  • Out of scope by default: Fabric mods, Forge mods, client mods, Bedrock add-ons

If the user says "Minecraft plugin" but the stack is unclear, first determine whether the project is Paper/Spigot/Bukkit or a modding stack.

Default Working Style

When this skill triggers:

  1. Identify the server API and version target.

  2. Identify the build system and Java version.

  3. Inspect plugin.yml, the main plugin class, and command or listener registration.

  4. Map the gameplay flow before editing code:

    • player lifecycle

    • game phases

    • timers and scheduled tasks

    • team, arena, or match state

    • config and persistence

  5. Make the smallest coherent change that keeps registration, config, and runtime behavior aligned.

If the plugin is gameplay-heavy or stateful, read references/project-patterns.md and references/state-sessions-and-phases.md before editing.

If the task touches arena isolation, map instances, chest or resource refills, wave spawning, route voting, spectator visibility, or game-specific chat, also read references/minigame-instance-flow.md.

If the task touches persistent player progression, profile saves, economy rewards, perks, buffs, quests, custom combat events, or long-running shared PvP servers, also read references/persistent-progression-and-events.md.

If the task touches build files, plugin.yml metadata, shaded dependencies, generated resource output, deployment to a test server, optional plugin integrations, or release validation, also read references/build-test-and-runtime-validation.md.

Project Discovery Checklist

Check these first when present:

  • plugin.yml

  • pom.xml, build.gradle, or build.gradle.kts

  • the plugin main class extending JavaPlugin

  • command executors and tab completers

  • listener classes

  • config bootstrap code for config.yml, messages, kits, arenas, or custom YAML files

  • generated resource output such as target/classes, build/resources, or copied plugin jars

  • scheduler usage through Bukkit scheduler APIs

  • any player data, team state, arena state, or match state containers

Core Rules

Prefer the concrete server API in the repo
  • If the project already targets Paper APIs, keep using Paper-first APIs instead of downgrading to generic Bukkit unless compatibility is explicitly required.

  • Do not assume an API exists across all versions. Check the existing dependency and surrounding code style first.

Keep registration in sync

When adding commands, permissions, or listeners, update the relevant registration points in the same change:

  • plugin.yml

  • plugin startup registration in onEnable

  • any permission checks in code

  • any related config or message keys

Respect main-thread boundaries
  • Do not touch world state, entities, inventories, scoreboards, or most Bukkit API objects from async tasks unless the API explicitly permits it.

  • Use async tasks for external I/O, heavy computation, or database work, then switch back to the main thread before applying gameplay changes.

Model gameplay as state, not scattered booleans

For gameplay plugins, prefer explicit state objects over duplicated flags:

  • match or game phase

  • player role or class

  • cooldown state

  • team membership

  • arena assignment

  • alive, eliminated, spectating, or queued state

When the feature affects match-heavy minigames or persistent-brawl gameplay, look for hidden state transitions first before patching symptoms.

For multi-arena plugins, isolate per-game visibility, chat recipients, scoreboards, loot, and entity ownership. Do not let one arena observe or mutate another arena by accident.

Favor config-driven values

When the feature includes damage, cooldowns, rewards, durations, messages, map settings, or toggles:

  • prefer config-backed values over hardcoding

  • provide sensible defaults

  • keep key names stable and readable

  • validate or sanitize missing values

Be careful with reload behavior
  • Avoid promising safe hot reload unless the code already supports it well.

  • On config reload, ensure in-memory caches, scheduled tasks, and gameplay state are handled consistently.

Implementation Patterns

Commands

For new commands:

  • add the command to plugin.yml

  • implement executor and tab completion when needed

  • validate sender type before casting to Player

  • separate parsing, permission checks, and gameplay logic

  • send clear player-facing feedback for invalid usage

Minimal registration shape:

commands:
  arena:
    description: Join or leave an arena
    usage: /arena <join|leave>
@Override
public void onEnable() {
    ArenaCommand command = new ArenaCommand(gameService);
    PluginCommand arena = getCommand("arena");
    if (arena != null) {
        arena.setExecutor(command);
        arena.setTabCompleter(command);
    }
}
Listeners

For event listeners:

  • guard early and return early

  • check whether the current player, arena, or game phase should handle the event

  • avoid doing expensive work in hot events such as move, damage, or interact spam

  • centralize repeated checks where practical

Scheduled Tasks

For timers, rounds, countdowns, cooldowns, or periodic checks:

  • store task handles when cancellation matters

  • cancel tasks on plugin disable and when a match or arena ends

  • avoid multiple overlapping tasks for the same gameplay concern unless explicitly intended

  • prefer one authoritative game loop over many loosely coordinated repeating tasks

  • ensure countdown or refill tasks self-cancel when the game leaves the expected state

Main-thread handoff shape:

Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> {
    PlayerData data = repository.load(playerId);
    Bukkit.getScheduler().runTask(plugin, () -> {
        Player player = Bukkit.getPlayer(playerId);
        if (player != null && player.isOnline()) {
            scoreboard.update(player, data);
        }
    });
});
Player and Match State

For per-player or per-match state:

  • define ownership clearly

  • clean up on quit, kick, death, match end, and plugin disable

  • avoid memory leaks from stale maps keyed by Player

  • prefer UUID for persistent tracking unless a live player object is strictly needed

Text and Messages

When the project uses Adventure or MiniMessage:

  • follow the existing formatting approach

  • avoid mixing legacy color codes and Adventure styles without a reason

  • keep message templates configurable when messages are gameplay-facing

High-Risk Areas

Pay extra attention when editing:

  • damage handling and custom combat logic

  • death, respawn, spectator, and elimination flow

  • arena join and leave flow

  • scoreboard or boss bar updates

  • inventory mutation and kit distribution

  • async database or file access

  • economy, quest, perk, and profile mutation

  • custom event dispatch or extension registries

  • version-sensitive API calls

  • shutdown and cleanup in onDisable

  • cross-arena visibility, chat, and broadcast isolation

  • map copy, unload, and folder deletion logic

  • mob, NPC, projectile, or temporary entity ownership

  • chest or resource refill systems

Output Expectations

When implementing or revising plugin code:

  • produce runnable Java code, not pseudo-code, unless the user asks for design only

  • mention any required updates to plugin.yml, config files, build files, or resources

  • call out version assumptions explicitly

  • point out thread-safety or API-compatibility risks when they exist

  • preserve the project's existing conventions and folder structure

When the requested change touches plugin startup, async data, match flow, class systems, or rotating maps, consult the matching reference file before editing.

Validation Checklist

Before finishing, verify as many of these as the task allows:

  • the command, listener, or feature is registered correctly

  • plugin.yml matches the implemented behavior

  • imports and API types match the targeted server stack

  • scheduler usage is safe

  • config keys referenced in code exist or have defaults

  • state cleanup paths exist for match end, player quit, and plugin disable

  • per-arena chat, visibility, scoreboards, and broadcasts are isolated

  • temporary worlds, mobs, tasks, and generated resources are cleaned up

  • there are no obvious null, cast, or lifecycle hazards

Common Gotchas

  • Casting CommandSender to Player without checking

  • Updating Bukkit state from async tasks

  • Forgetting to register listeners or declare commands in plugin.yml

  • Using Player objects as long-lived map keys when UUID is safer

  • Leaving repeating tasks alive after a round, arena, or plugin shutdown

  • Hardcoding gameplay constants that should live in config

  • Assuming Paper-only APIs in a Spigot-targeted plugin

  • Treating reload as free even though stateful plugins often break under reload

  • Broadcasting, showing players, or applying scoreboard changes across unrelated game instances

  • Loading or mutating chest/container blocks before their chunks are available

  • Forgetting to unregister spawned mobs or temporary entities from the owning game

  • Editing generated files under target/classes or build/resources instead of source files under src/main/resources

Preferred Response Shape

For substantial requests, structure work like this:

  1. Current plugin context and assumptions

  2. Gameplay or lifecycle impact

  3. Code changes

  4. Required registration or config updates

  5. Validation and remaining risks

For small requests, keep the answer concise but still mention any needed plugin.yml, config, or lifecycle updates.

Files

references/minigame-instance-flow.md

Minigame Instance Flow

Use this reference when building arena-style PvP games, SkyWars-style island games, dungeon or wave modes, rotating map instances, or any plugin where multiple players, worlds, mobs, scoreboards, and timers belong to a specific game instance.

Instance ownership pattern

Good minigame plugins make ownership explicit:

  • a global GameManager or GameService tracks active games

  • each Game owns its map or world instance

  • players are mapped to exactly one active game or lobby state

  • temporary mobs, projectiles, NPCs, or spawned objects are mapped back to their owning game

  • scoreboards, visibility, chat recipients, loot, and timers are scoped to the owning game

Recommended maps:

  • Map<String, Game> for active games by generated ID

  • Map<UUID, Game> or Map<UUID, PlayerSession> for player ownership

  • Map<UUID, Game> for spawned mob or entity ownership when using MythicMobs, custom NPCs, or boss waves

Avoid relying on world name, inventory contents, scoreboard text, or entity display names as the only source of truth.

State machine for arena games

Common PvP arena states:

  • WAITING

  • STARTING

  • STARTED

  • ENDED

Common persistent-brawl states:

  • LOBBY

  • RESPAWNING

  • IN_BRAWL

Common dungeon or route-node states:

  • lobby or route-selection phase

  • active combat node

  • peaceful room, shop, event, or rest node

  • victory or cleanup phase

Guidance:

  • gate every event listener by state before applying gameplay effects

  • when transitioning state, update timers, scoreboards, visibility, player inventory, and protected areas together

  • use state changes as the single place to start countdowns, refill tasks, end countdowns, and wave spawning

  • if a task only makes sense in one state, it should cancel itself when the game leaves that state

Player isolation

Multi-arena plugins must isolate more than teleport destinations.

Check these surfaces:

  • player visibility with showPlayer and hidePlayer

  • chat recipients, especially in AsyncChatEvent

  • scoreboard instances and sidebar updates

  • tab list names or ranks

  • boss bars and title broadcasts

  • lobby items and game-only inventory state

  • damage, block, item pickup, item drop, interact, teleport, respawn, and quit events

Rules:

  • if two players are not in the same visibility group, hide them from each other from both directions

  • lobby players should not receive arena chat or arena broadcasts

  • arena players should not receive unrelated lobby or other-arena game messages

  • spectator players should be excluded from combat, pickup, block, and interaction logic unless explicitly allowed

Countdown and repeating task lifecycle

Typical tasks:

  • start countdown

  • end countdown

  • chest or resource refill countdown

  • scoreboard or sidebar flush

  • phase or wave delay

  • map rotation ticker

  • dirty data flush

Rules:

  • store BukkitTask handles when cancellation matters

  • do not start a second task for the same game concern without canceling or checking the first

  • countdown tasks should read the current game state on every tick and self-cancel when stale

  • delay tasks should re-check that the game still exists and is still running before acting

  • clean up tasks on game end and plugin shutdown

Loot and resource refill systems

Sky-island and arena plugins often need config-driven resource distribution.

Useful structure:

  • group container locations by role, such as island, middle, center, normal, rare, or overpowered

  • load weighted loot from config

  • build a total loot pool for a group

  • shuffle items before placing them

  • choose random empty inventory slots with a bounded retry loop

  • validate missing or invalid loot config by warning and falling back safely

Container safety:

  • load the chunk before reading a configured chest or barrel

  • verify the block is a Container before casting

  • if the configured block is missing, either recreate it intentionally or warn and skip it

  • clear previous contents before refill if the design expects a full reset

  • avoid heavy loot generation in hot events

Wave, mob, and route-node systems

Dungeon-style plugins commonly combine route selection with combat waves.

Recommended model:

  • keep a queue of pending mob IDs for the current wave

  • keep a set of active mob UUIDs for spawned mobs

  • register each spawned mob UUID to the owning game

  • on mob death, remove it from the active set and unregister ownership

  • a wave is clear only when both the pending queue and active set are empty

  • after a wave clears, schedule the next wave or return to the route/lobby phase

Route voting guidance:

  • only alive and active players should vote or proceed

  • prune vote maps against currently active player UUIDs before checking thresholds

  • handle missing stage templates with a fallback or a clean victory/end path

  • peaceful rooms should have a clear proceed gate instead of silently advancing

Cleanup rules:

  • unregister mobs on death, game stop, and plugin disable

  • unload old stage maps only after players are safely teleported out

  • clear wave queues and active mob sets when a game ends

  • never let a stale mob death event advance a completed or deleted game

Map instance and rotation rules

For copied temporary worlds:

  • copy the source map into a unique active folder

  • create or load the world from that folder

  • configure gamerules after the world exists

  • set autosave intentionally

  • teleport players out before unload

  • unload the world before deleting its folder

  • delete old folders after unload and log failures

For rotating shared battlefields:

  • warn players before rotation

  • snapshot current participants before loading the next map

  • move participants to the new spawn and reset transient class or ability state

  • refresh scoreboards, tab names, leaderboards, and visibility after rotation

  • prevent scoreboard refresh from running every tick if the displayed countdown changes slowly

Listener heuristics

For every listener touching gameplay state:

  • return early if the entity or player has no session

  • resolve the owning game once and reuse it

  • check the game state before mutating blocks, inventory, health, drops, or scoreboards

  • check spectator, safe-zone, team, and combat-tag rules before allowing damage

  • keep world-to-game and entity-to-game checks consistent

  • do not assume Player#getKiller() is enough for custom combat; use combat tags when projectile, skill, or ability damage matters

Third-party plugin integrations

Common integrations:

  • PlaceholderAPI for scoreboards, tab names, or external placeholders

  • MythicMobs for custom mob spawning and skills

  • menu plugins for lobby selectors

  • database libraries for player progression

Rules:

  • declare hard dependencies in depend only when startup cannot work without them

  • use softdepend and runtime checks for optional features

  • keep optional integration registration isolated from core startup

  • when casting external skills or spawning external mobs, handle missing IDs and API failures gracefully

  • prefer service boundaries so the rest of the game code does not directly depend on every integration API

Requirements and compatibility

Written for: GitHub Copilot

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

First committed by
GitHub avatar of zixuanjiang332zixuanjiang332
Publisher
GitHub (Official)
Distributed by
GitHub
Source
github/awesome-copilot · skills/minecraft-plugin-development · commit 797337f
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced
Contributors
zixuanjiang332

AutoGineer is not affiliated with or endorsed by zixuanjiang332 or GitHub.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download minecraft-plugin-development.zip