Minecraft

How to make a Minecraft plugin

A clear walkthrough of building a Paper or Spigot plugin, from the Bukkit API basics to compiling a loadable .jar, plus how to generate one from a sentence with Devellix.

6 min read · Updated Jul 28, 2026

A Minecraft plugin is a small Java program that a Paper or Spigot server loads to change how the game behaves: new commands, custom items, minigames, protection rules, or economy systems. Unlike a mod, a plugin runs only on the server, so players join with a normal client and nothing to install.

Writing one by hand means learning the Bukkit event model, scaffolding a Gradle project, wiring a plugin.yml, and getting through javac errors before anything loads. This guide covers the real steps, then shows how to skip the boilerplate and get a compiled jar from a plain-English description.

Step by step

  1. 1

    Decide exactly what the plugin should do

    Write the behavior as one or two concrete sentences: the command or event that triggers it, what happens, and any limits like cooldowns or permissions. A tight description ("a /kit command that gives a starter kit on a 30-minute cooldown") is far easier to build and test than a vague one.

  2. 2

    Understand the pieces a plugin needs

    Every Paper plugin has a main class that extends JavaPlugin, a plugin.yml that declares its name and commands, and usually listeners for in-game events plus a config.yml for tunable values. Commands are registered in plugin.yml and handled in code; events are handled by registering a Listener.

  3. 3

    Set up the project and the Paper API

    Create a Gradle project, add the Paper API as a compile-only dependency, and target Java 17 or newer. This is the step that trips up most beginners, because the plugin must compile against the exact server API it will run on, not a generic Java setup.

  4. 4

    Write, compile, and fix the errors

    Implement the command and event logic, then compile against the Paper classpath to produce a jar. Expect compile errors on the first pass: missing imports, wrong method signatures, or API changes between versions. Each one has to be read and patched before the jar will build.

  5. 5

    Generate it from a sentence with Devellix

    Instead of the setup and the compile loop, describe the plugin on Devellix and pick Minecraft. It plans the classes, writes the Java, compiles against the Paper API in the cloud, fixes build errors on its own, and hands you both the source and a ready .jar to drop into your server's plugins folder.

  6. 6

    Test on a server and iterate

    Load the jar on a local Paper server, run the command, and confirm the behavior. To change it, refine the description and rebuild. Because you own the full source, you can also open it and edit any file directly.

What you can build

  • A /kit command with per-player cooldowns and configurable items
  • A grappling hook or double-jump movement item
  • A wave-based mob arena with a scoreboard
  • Region protection that blocks griefing in a claimed area
  • A simple economy with balances and a shop
Describe yours

Frequently asked

To write one by hand, yes. With Devellix you describe the plugin in plain English and it writes the Java, compiles it, and gives you the source, so you can start without Java and learn from the generated code.
A plugin runs only on a Paper or Spigot server and needs no client changes, so any player can join normally. A mod (Forge or Fabric) changes the client and must be installed by every player. Plugins are the standard way to add server features.
You build a Gradle project against the Paper API and run the build to produce a jar. Devellix does this compile step for you in the cloud and gives you the loadable jar plus the source.
Plugins written against the Bukkit API load on both Spigot and Paper, which is what most communities run. You own the source, so adjusting for a specific server version is straightforward.

Keep reading

Stop reading. Start building.

Describe what you want and Devellix writes it, builds it, and hands you the source. Free credits to start.