Compile Lab
Edit any example plugin in the browser and compile it against Paper 26.3 with real error messages.
Open any plugin from this guide, change it, and compile it against the real Paper 26.3 API, right here in your browser. You will learn to read compiler errors and fix them before you ever open IntelliJ.
What compiling means
The Java files you write are source code: text that people can read. A Minecraft server cannot run that text directly. First the compiler (a program called javac) reads every file, checks that the Java is correct and that every Paper class and method you use really exists, and turns your code into class files. Then all of the class files and your plugin.yml are packed into one jar file. That jar is your plugin: you drop it into a server's plugins folder.
This whole job is called compiling. IntelliJ and Gradle do exactly the same thing when you press Build Plugin Jar; the Compile Lab simply lets you do it without setting anything up.
The lab
Pick a project, click a file on the left to open it, and press Compile (or Ctrl+Enter). Your changes are saved in this browser, so you can leave and come back. Reset project always brings back the original code, so break things freely.
Loading the Compile Lab...
How to read a compiler error
When something is wrong, the compiler does not guess. It stops and prints a compiler error. Every error has the same four parts. Here is a real one, from a listener with a missing semicolon:
src/main/java/com/example/welcome/WelcomeListener.java:12: error: ';' expected player.sendRichMessage("<green>Welcome to the server!") ^1 error- The file:
WelcomeListener.java, with its folder path in front. - The line number: the number after the colon,
12. In the lab, click the problem and the editor jumps to that line and marks it in red. - The message: what Java expected, here
';' expected. - The arrow: the line of code again, with a
^under the exact spot where Java got confused.
Some errors add two more lines. cannot find symbol tells you which name it did not know (symbol: class Player) and where you used it (location: class WelcomeListener):
src/main/java/com/example/welcome/WelcomeListener.java:11: error: cannot find symbol Player player = event.getPlayer(); ^ symbol: class Player location: class WelcomeListener1 errorHere Java knows nothing called Player because the file is missing import org.bukkit.entity.Player; at the top.
The errors you will meet most
| Message | What it usually means | How to fix it |
|---|---|---|
';' expected | A statement does not end with a semicolon. | Add ; at the end of the line the arrow points at, or the line above it. |
cannot find symbol | A name is misspelled, has the wrong capital letters, or its class is not imported. | Check the spelling against the guide's example and add the missing import. |
package ... does not exist | An import names a package that is not in Paper 26.3. | Copy the import from a guide example; old tutorials often use names that moved. |
incompatible types | A value has the wrong type, like text where a number is needed. | Look at what the method expects; hover it in a guide example. |
reached end of file while parsing | A { was never closed. | Add the missing }. The editor highlights the partner of the brace next to your cursor. |
class X is public, should be declared in a file named X.java | The class name and the file name do not match. | Rename one so they match exactly, including capital letters. |
method does not override or implement a method from a supertype | @Override sits on a method with a misspelled name, like onEnabled. | Use the exact name: onEnable, onDisable. |
Every problem in the lab comes with a plain-English tip like these. For errors that happen while the server runs (not while compiling), use the Error Doctor.
Live mode and file mode
Compiling needs Java 25 on your PC, so it only works in live mode: open the guide by double-clicking Start Guide.cmd in the guide's folder. In file mode (when you open index.html directly) you can still read, edit and add files, and every example shows that it compiled on Paper 26.3 when the guide was built. Read Live mode and file mode for the details.
What to do with the jar
After a successful compile, Download gives you the plugin jar. You have two ways to try it:
- Start a real Paper 26.3 server from the Test Server page and pick your jar from the list. It shows up there automatically.
- Copy the jar into the
pluginsfolder of your own server and restart it. Build and run shows the full workflow with IntelliJ.