Paper Plugin Guide
File mode0

Start here

Your toolbox: Java, IntelliJ and Gradle

Install and understand the three tools every plugin developer uses.

Beginner24 min read

Every plugin developer uses the same three tools: Java to compile and run code, IntelliJ IDEA to write it, and Gradle to turn it into a plugin jar. On this page you will install them on Windows 11, learn what each one does and why you need it, and prove that everything works by building a tiny plugin.

The three tools at a glance

Making a plugin is a short assembly line. You write code in one program, a second program organizes the build, and a third one does the actual translating and running:

IntelliJ IDEA where you write and read code, press Run and Build Gradle downloads the Paper API and runs every build step JDK 25 javac compiles your code; java runs the server Plugin jar goes into a Paper server's plugins folder TourPlugin.java build.gradle.kts .class files my-plugin-1.0.0.jar You press one button in IntelliJ; Gradle and the JDK do the rest.
You write the code in IntelliJ IDEA. Gradle runs the build and uses the JDK to compile it. The result is a plugin jar for a Paper server.
ToolWhat it isMinecraft comparison
JDK 25 (Java)The compiler that turns your code into bytecode (instructions that Java's engine can run), and the engine that runs Java programs, including the Paper server.The furnace: it turns raw material (your code) into something usable.
IntelliJ IDEAA code editor that understands Java: it finishes your words, underlines mistakes and runs your server with one click.Your crafting table, with the recipe book open.
GradleA build tool. It downloads the Paper API (the list of things your plugin may ask the server to do), calls the compiler, and packs the jar.A redstone contraption that runs the whole furnace line for you.

You install Java and IntelliJ yourself. Gradle installs itself, as you will see.

Java: installing the JDK

JDK, JRE and version numbers

"Java" comes in two packages, and the names are easy to confuse:

  • The JRE (Java Runtime Environment) can only run Java programs. It is enough to play or host a server, but not to make plugins.
  • The JDK (Java Development Kit) contains everything in the JRE plus the developer tools, most importantly the compiler, javac. You need the JDK.

Java also has version numbers, and a new version comes out every six months. Some versions are marked LTS (long-term support): they get updates for years, so servers and tools settle on them. You will meet these numbers in tutorials:

Java versionWhere you will see it
8Very old tutorials and plugins for ancient Minecraft versions.
17Minecraft 1.18 to 1.20.4.
21Minecraft 1.20.5 to 1.21.x.
25Minecraft 26.x and Paper 26.3. This is the one you need.

Minecraft 26.3 itself is built with Java 25, so the Paper 26.3 server needs Java 25 or newer to start, and your plugins are compiled for Java 25 too. Newer Java versions can run older code, but not the other way around: a Java 21 installation cannot start a Paper 26.3 server.

Java is free, and several organizations build it. This guide uses Eclipse Temurin, a free, popular build of Java from the Eclipse Adoptium project. Any Java 25 JDK works, but Temurin is the easy, safe choice.

Install Temurin 25

Pick one of these two ways. They install exactly the same thing.

  1. Download

    Go to adoptium.net. Choose Windows, x64, package type JDK, version 25, and download the .msi file.

  2. Run the installer

    Double-click the .msi. On the "Custom Setup" screen, also turn on Set JAVA_HOME variable (click the icon next to it and choose "Will be installed on local hard drive"). Leave "Add to PATH" on. Then click through to the end.

  3. Open a new terminal

    Programs only see a newly installed Java after they start again, so close any terminal or IntelliJ window that was already open.

Windows 11 has a built-in installer called winget. Open PowerShell (see the terminal section below) and run:

PowerShell
 winget install EclipseAdoptium.Temurin.25.JDKFound Eclipse Temurin JDK with Hotspot 25 [EclipseAdoptium.Temurin.25.JDK] Version 25.0.4.101This application is licensed to you by its owner.Downloading https://github.com/adoptium/temurin25-binaries/releases/download/jdk-25.0.4%2B1/OpenJDK25U-jdk_x64_windows_hotspot_25.0.4_1.msiSuccessfully verified installer hashStarting package install...Successfully installed

Windows may ask for permission to make changes; say yes. Then close the terminal and open a new one.

Check it with java -version

Open a new PowerShell window and type java -version, then press Enter. If Temurin 25 is the Java Windows finds first, you see something like this:

PowerShell
 java -versionopenjdk version "25.0.4.1" 2026-08-18 LTSOpenJDK Runtime Environment Temurin-25.0.4.1+1 (build 25.0.4.1+1-LTS)OpenJDK 64-Bit Server VM Temurin-25.0.4.1+1 (build 25.0.4.1+1-LTS, mixed mode, sharing)
PowerShell after java -version. The first line shows the version number: 25 is what you want.

The number right after version is what matters: it starts with 25. The rest is the exact build and the vendor (Temurin).

If you see "java is not recognized", Windows cannot find Java at all. Close every terminal and open a new one; if it still fails, run the installer again and make sure "Add to PATH" is on.

When java -version shows an older version

You may see an older number, for example 21, even after installing 25. That happens when a PC has several Java versions. When you type java, Windows looks through a list of folders called the PATH and runs the first java.exe it finds. If an older Java is earlier in that list, it wins.

To see every Java on the PATH, in order, type where.exe java:

PowerShell
 where.exe javaC:\Program Files\Common Files\Oracle\Java\javapath\java.exeC:\Program Files\Eclipse Adoptium\jdk-25.0.4.101-hotspot\bin\java.exe

Here an Oracle Java comes first, so java -version shows that one. Type the full where.exe; in PowerShell, plain where means something else.

For plugin projects, this is fine. The guide's projects tell Gradle "compile with Java 25" (a setting called a toolchain, which you will see below). Gradle then finds Java 25 by itself, wherever it is installed, and if it cannot find one it downloads it. Gradle itself only needs some Java 17 or newer to start. So an older Java on the PATH does not break your builds. It only matters when you run java yourself, for example to start a server by hand, and then you can type the full path to Java 25's java.exe.

Your first check: a program and a plugin

Here is a tiny Java program that prints which Java runs it. Press the green arrow to see the output recorded on a PC with Temurin 25; in live mode it reports your own Java.

JavaCheck.javaRuns on Java 25
1void main() {2    IO.println("Java version: " + Runtime.version().feature());3    IO.println("Full version: " + Runtime.version());4    IO.println("Made by: " + System.getProperty("java.vendor"));5}
  1. Asks the running Java for its main version number, such as 25.
  2. The complete version, with the update number and build.
  3. Who built this Java. For Temurin it says Eclipse Adoptium.

Plugins can ask the same question. This plugin prints the Java version and the Minecraft version in the server console when the server starts. It is a handy first plugin to prove your whole toolbox works, from editor to server:

ToolboxCheckPlugin.javaCompiles on Paper 26.3Compile Lab
Where this file livestoolbox-checksrcmainjavacomexampletoolboxcheckToolboxCheckPlugin.java

The package com.example.toolboxcheck is the folder path com/example/toolboxcheck inside src/main/java: every dot in the package name is one folder. IntelliJ creates these folders for you when you make a new package.

  • toolbox-check/
    • src/main/
      • java/com/example/toolboxcheck/Package com.example.toolboxcheck
        • ToolboxCheckPlugin.javayou are hereMain class: Paper starts here (named as main in plugin.yml)
      • resources/Files copied into the jar as they are
        • plugin.ymlTells Paper the plugin's name, version and main class
    • build.gradle.ktsThe build recipe: Paper 26.3 API, Java 25, how the jar is made
    • gradle.propertiesVersion numbers used by the build
    • gradlew.batRuns Gradle on Windows without installing it
    • settings.gradle.ktsThe project's name

Gray files come with the project template; you rarely edit them. Open the whole project in the Compile Lab, or download it from the project page.

1package com.example.toolboxcheck;2 3import org.bukkit.plugin.java.JavaPlugin;4 5public final class ToolboxCheckPlugin extends JavaPlugin {6 7    @Override8    public void onEnable() {9        getLogger().info("Running on Java " + Runtime.version().feature());10        getLogger().info("Minecraft version: " + getServer().getMinecraftVersion());11        getLogger().info("Your toolbox works. Time to build plugins!");12    }13}
  1. The main class of the plugin, as in every plugin.
  2. Runs once, when the server turns the plugin on.
  3. The same Runtime.version() as in the program above. Plain Java works inside plugins too.
  4. Asks the Paper server which Minecraft version it runs. This is Paper API, which plain Java programs do not have.
  5. Writes a line to the server console, starting with the plugin's name in brackets.
Server console
[14:02:09 INFO]: [ToolboxCheck] Enabling ToolboxCheck v1.0.0[14:02:09 INFO]: [ToolboxCheck] Running on Java 25[14:02:09 INFO]: [ToolboxCheck] Minecraft version: 26.3[14:02:09 INFO]: [ToolboxCheck] Your toolbox works. Time to build plugins!

You will run this plugin yourself at the end of Your first plugin, or right now if you download it as a project and open it in IntelliJ after the next section.

IntelliJ IDEA: your code editor

You could write Java in Notepad, but you would be working blind. An IDE (integrated development environment) is an editor that understands your code. IntelliJ IDEA, made by JetBrains, is the IDE almost every Minecraft developer uses. It finishes method names for you, shows mistakes as you type, explains every Paper method, and starts a test server with one click.

Free or Ultimate?

IntelliJ IDEA has a free part and paid "Ultimate" features. Since version 2025.3 it is a single download: you install IntelliJ IDEA, use the free features without any subscription, and only pay if you want Ultimate extras (mostly for web and database work). Everything in this guide works with the free features.

Older tutorials talk about a separate "Community Edition". That was the free version until 2025.2; today's single IntelliJ IDEA download replaces it. If a tutorial says "install Community Edition", install the normal IntelliJ IDEA instead.

Install and first launch

  1. Download and install

    Get IntelliJ IDEA from jetbrains.com/idea/download and run the installer with the default options. Or, in PowerShell: winget install JetBrains.IntelliJIDEA

  2. Start it

    The first time, IntelliJ may ask whether to import settings (choose not to) and may offer a JetBrains account login or a trial of the Ultimate features; you can skip both, because the free features need neither. Then the welcome screen opens.

  3. Pick a theme

    Dark or light is up to you. The screenshots in this guide use the default dark theme.

The IntelliJ welcome screen. From here you open projects; the Plugins page on the left is where you add the Minecraft Development plugin.

Add the Minecraft Development plugin

IntelliJ can be extended with its own plugins (not to be confused with Minecraft plugins). One of them, Minecraft Development, makes it much smarter about Minecraft code: it has a wizard for new plugin projects, understands plugin.yml, and warns about common plugin mistakes.

  1. Open the plugin settings

    On the welcome screen click Plugins, or inside a project open FileSettingsPlugins (shortcut Ctrl+Alt+S, then pick Plugins).

  2. Search the Marketplace

    Click the Marketplace tab and search for Minecraft Development.

  3. Install and restart

    Click Install, then Restart IDE.

Settings, Plugins, Marketplace tab, with Minecraft Development found. Click Install, then restart IntelliJ.

The IntelliJ survival guide teaches the handful of IntelliJ features you will use every day.

Gradle: the build recipe

Turning your code into a plugin jar takes several steps: download the Paper API so the compiler knows what Player and sendRichMessage are, compile every .java file with Java 25, copy plugin.yml next to the classes, and zip it all into a jar. Doing that by hand every time would be miserable.

Gradle is a build tool: you write a recipe once, and Gradle follows it every time you build. The recipe lives in a file called build.gradle.kts inside each project. Here is the important part of the one every project in this guide uses:

build.gradle.kts (part)
1repositories {2    mavenCentral()3    maven("https://repo.papermc.io/repository/maven-public/")4}5 6dependencies {7    compileOnly("io.papermc.paper:paper-api:$paperVersion")8}9 10java {11    toolchain.languageVersion = JavaLanguageVersion.of(25)12}
  1. Where Gradle downloads things from. A repository is an online library of code packages.
  2. PaperMC's own repository, where the Paper API lives.
  3. The biggest public repository of Java libraries. Gradle looks here for anything that is not in the PaperMC repository.
  4. A dependency is code written by someone else that your plugin needs. Here, the only one is the Paper API.
  5. "I need the Paper API to compile, but do not pack it into my jar." The server already contains the API, so packing it would only make your jar huge.
  6. Which API, and which version: paperVersion is set to 26.3.build.142-beta in a file next to this one.
  7. Settings for the Java compiler step.
  8. The toolchain: "compile with Java 25". This is why an older Java on your PATH does not matter.

You do not need to understand Kotlin (the language this file is written in) to make plugins. Anatomy of a plugin project explains every line of this file, and the Gradle and Maven reference shows how to add other libraries.

The Gradle wrapper: nothing to install

Every project comes with two small files, gradlew and gradlew.bat, plus a gradle/wrapper folder. Together they are the Gradle wrapper. The first time you build, the wrapper downloads the exact Gradle version the project wants (9.8.0) into your user folder, and then uses it. That means:

  • You never install Gradle yourself.
  • Every project builds with the Gradle version it was made for, on every PC.
  • The first build takes a minute or two (downloading Gradle and the Paper API); later builds take seconds.

Inside IntelliJ you never even type a Gradle command: the Build Plugin Jar and Run Paper Server buttons call Gradle for you. From a terminal, you run the wrapper with .\gradlew.bat build, which the next section shows.

Maven, the other build tool

Some tutorials, and IntelliJ's Minecraft Development project wizard, use Maven instead of Gradle. It does the same job with a recipe file called pom.xml. Here is the same Paper API dependency in both:

build.gradle.kts
1dependencies {2    compileOnly("io.papermc.paper:paper-api:26.3.build.142-beta")3}

Build with .\gradlew.bat build. The jar lands in build\libs.

pom.xml
1<dependency>2    <groupId>io.papermc.paper</groupId>3    <artifactId>paper-api</artifactId>4    <version>26.3.build.142-beta</version>5    <scope>provided</scope>6</dependency>

Build with mvn package. The jar lands in target. provided means the same as Gradle's compileOnly.

Both are fine. This guide uses Gradle, because its run-paper plugin starts a test server with one click.

A terminal crash course

A terminal is a window where you type commands instead of clicking. You will not live in it, but you need a few commands to check versions and build jars. On Windows 11 the terminal runs PowerShell.

Opening a terminal

  • From the Start menu: press the Windows key, type Terminal, press Enter.
  • In a folder: right-click an empty spot in a File Explorer folder and choose Open in Terminal. The terminal starts inside that folder, which saves typing.
  • Inside IntelliJ: press Alt+F12. It opens at the bottom of the window, already inside your project folder. This is the one you will use most.
IntelliJ's terminal opens at the bottom of the window, already in your project folder.

The commands you need

The terminal always works "inside" one folder, shown before the cursor (for example PS C:\Users\jacec>). Commands act on that folder.

Type thisWhat it does
cd IdeaProjectsChange directory: go into the folder IdeaProjects.
cd ..Go up one folder.
dir (or ls)List what is in the current folder.
.\gradlew.bat buildBuild the plugin in the current project folder.
java -versionShow which Java the terminal finds first.
clsClear the screen.
TabFinish a folder or file name for you. Type cd Idea and press Tab.
Up arrowBring back the previous command, so you do not have to type it again.
Ctrl+CStop the program that is running in the terminal.

Building a plugin from the terminal

This is a real build of the check plugin from above, run in its project folder:

PowerShell
 cd C:\Users\jacec\IdeaProjects\toolbox-check .\gradlew.bat build> Task :compileJava> Task :processResources> Task :classes> Task :jar> Task :assemble> Task :check UP-TO-DATE> Task :buildBUILD SUCCESSFUL in 6s3 actionable tasks: 3 executed dir build\libs    Directory: C:\Users\jacec\IdeaProjects\toolbox-check\build\libsMode                 LastWriteTime         Length Name----                 -------------         ------ -----a----         10/3/2026   2:02 PM           1732 toolbox-check-1.0.0.jar

Read the task lines like a to-do list Gradle works through: compileJava runs the compiler, processResources copies plugin.yml, jar packs the jar. BUILD SUCCESSFUL means it all worked, and the finished plugin is toolbox-check-1.0.0.jar. That file is what you would copy into a server's plugins folder.

Gradle also prints a few extra lines you can ignore for now, such as "Deprecated Gradle features were used in this build" or a link to a problems report. They are notes about Gradle's own future versions, not errors in your code. Only BUILD FAILED means something is wrong.

Optional tools

  • Minecraft: Java Edition, version 26.3. To join your test server and see your plugin in the game. In the Minecraft launcher, open Installations, create a new installation, pick release 26.3, and play it. You can develop without the game, but seeing your work is half the fun.
  • Git. Saves every version of your code so you can undo mistakes and share projects. Install it from git-scm.com or with winget install Git.Git. Git and GitHub teaches it later; you do not need it to start.
  • A plain text editor. Windows Notepad is enough for a quick look at a log or config file on a server. IntelliJ edits all your project files, including plugin.yml, so you do not need Notepad++ or any other editor.

Checklist: is everything ready?

Go through these in order. Each step tells you what "working" looks like.

  1. Java 25 is installed

    In a new terminal, java -version starts with 25, or where.exe java lists a jdk-25 folder (fine even if an older Java comes first).

  2. IntelliJ IDEA starts

    The welcome screen opens, and under Plugins, the Installed tab lists Minecraft Development.

  3. A project opens

    Download the toolbox check project, unzip it, and open the folder in IntelliJ with FileOpen. Wait until the progress bar at the bottom finishes (the first time, Gradle downloads itself and the Paper API).

  4. Gradle builds a jar

    In IntelliJ's terminal (Alt+F12), .\gradlew.bat build ends with BUILD SUCCESSFUL, and build\libs contains toolbox-check-1.0.0.jar.

  5. Optional: the guide runs live

    Double-click Start Guide.cmd in the guide's folder. The badge at the top of the guide changes from "File mode" to live mode, and the green run arrows run code on your PC.

If a step fails, paste the error into the Error Doctor, or check the FAQ.

Try it

Make the check plugin report more

Change ToolboxCheckPlugin so it also prints the name of the server software it runs on (on Paper, this prints Paper). Put the new line right after the Minecraft version line. Check it compiles in the Compile Lab, or build it with Gradle.

Hint 1

The server object can tell you its name. Inside onEnable, type getServer(). (with the dot) in IntelliJ and look through the list for a method that sounds right.

Hint 2

The method is getServer().getName(). Copy the Minecraft version line and change it.

Show the solution

One new getLogger().info(...) line. The + joins the label text and the name into one line of text.

ToolboxCheckPlugin.javaCompiles on Paper 26.3Compile Lab
Where this file livestoolbox-check-exercisesrcmainjavacomexampletoolboxcheckexerciseToolboxCheckPlugin.java

The package com.example.toolboxcheckexercise is the folder path com/example/toolboxcheckexercise inside src/main/java: every dot in the package name is one folder. IntelliJ creates these folders for you when you make a new package.

  • toolbox-check-exercise/
    • src/main/
      • java/com/example/toolboxcheckexercise/Package com.example.toolboxcheckexercise
        • ToolboxCheckPlugin.javayou are hereMain class: Paper starts here (named as main in plugin.yml)
      • resources/Files copied into the jar as they are
        • plugin.ymlTells Paper the plugin's name, version and main class
    • build.gradle.ktsThe build recipe: Paper 26.3 API, Java 25, how the jar is made
    • gradle.propertiesVersion numbers used by the build
    • gradlew.batRuns Gradle on Windows without installing it
    • settings.gradle.ktsThe project's name

Gray files come with the project template; you rarely edit them. Open the whole project in the Compile Lab, or download it from the project page.

7@Override8public void onEnable() {9    getLogger().info("Running on Java " + Runtime.version().feature());10    getLogger().info("Minecraft version: " + getServer().getMinecraftVersion());11    getLogger().info("Server software: " + getServer().getName());12    getLogger().info("Your toolbox works. Time to build plugins!");13}
  1. Asks the server for the name of its software.
Server console
[14:02:09 INFO]: [ToolboxCheck] Running on Java 25[14:02:09 INFO]: [ToolboxCheck] Minecraft version: 26.3[14:02:09 INFO]: [ToolboxCheck] Server software: Paper[14:02:09 INFO]: [ToolboxCheck] Your toolbox works. Time to build plugins!
Try it

Find your jar from the terminal

Using only the terminal, go into the toolbox check project folder, build it, and list the files in build\libs. Then go back up to your user folder.

Hint

You need cd to move, .\gradlew.bat build to build and dir to list. Use Tab to finish long folder names.

Show the solution

Your folder names may differ, and the build output is shortened here. The cd .. commands each go up one level, from toolbox-check to IdeaProjects to your user folder.

PowerShell
 cd C:\Users\jacec\IdeaProjects\toolbox-check .\gradlew.bat buildBUILD SUCCESSFUL in 2s dir build\libs-a----         10/3/2026   2:04 PM           1732 toolbox-check-1.0.0.jar cd .. cd ..

The second build was faster than the first, because Gradle had already downloaded everything. If nothing changed since the last build, Gradle may even skip the work and say UP-TO-DATE.

Recap

  • You need a JDK (not just a JRE), version 25, because Minecraft 26.3 and Paper 26.3 need Java 25. Temurin is a good free choice.
  • java -version shows the first Java on the PATH. An older one there is fine for plugin projects, because Gradle's toolchain picks Java 25 by itself.
  • IntelliJ IDEA is your editor; its free features are all you need. Add the Minecraft Development plugin from the Marketplace.
  • Gradle follows the recipe in build.gradle.kts: it downloads the Paper API (compileOnly), compiles with Java 25 and packs the jar into build\libs.
  • The Gradle wrapper (gradlew.bat) downloads the right Gradle version, so you never install Gradle yourself.
  • In PowerShell: cd moves, dir lists, .\gradlew.bat build builds.

Quick quiz

  1. Why do you need the JDK and not just the JRE?

  2. java -version says 21, but you installed Temurin 25. Can you still build your Paper 26.3 plugin with Gradle?

  3. Why is the Paper API added with compileOnly?

  4. You type gradlew.bat build in PowerShell and get "not recognized". What is the fix?

  5. Where does Gradle put the finished plugin jar?

Next steps