A step-by-step guide to setting up a local Spigot plugin development environment with IntelliJ IDEA, from project creation to live debugging.
- IntelliJ IDEA (Community Edition is fine)
- Java 21 (Eclipse Temurin)
- A copy of Minecraft Java Edition
Open IntelliJ IDEA and create a new project with the following settings:
| Field | Value |
|---|---|
| Group | Plugin |
| Template | Spigot |
| Build System | Maven |
| Language | Java |
| Minecraft Version | 1.21.3 (or your target version) |
| JDK | Java 21 |
Avoid placing the project on your system drive — permission issues can prevent the server from writing files at runtime.
Create a folder named run in your project root. This keeps server files separate from your source code.
Download the Spigot JAR for your target version from getspigot.org and place it in the run folder.
Tip: Building from source with BuildTools is recommended for production use, but a pre-built JAR is fine for local development.
Create run/start.bat with the following content, adjusting the paths to match your setup:
@echo off
:start
cd /d "C:\your\project\run"
"C:\Program Files\Eclipse Adoptium\jdk-21.0.10.7-hotspot\bin\java" -jar spigot-1.21.3.jar nogui
pause
goto startNote the space between
java"and-jar— missing it will cause a startup failure.
Run start.bat. The server will stop on first launch asking you to accept the EULA. Open run/eula.txt and set:
eula=true
Run start.bat again. The server will finish initializing and generate all required files.
Open run/server.properties and apply the following settings for local development:
gamemode=creative
server-ip=127.0.0.1
server-port=25565
motd=Local Debug ServerDo not add inline comments to
server.properties— they will appear as part of the value.
Launch Minecraft, go to Multiplayer → Add Server, and enter 127.0.0.1:25565.
Go to File → Project Structure → Modules, find the run folder, and mark it as Excluded. This prevents IDEA from indexing server files and slowing down the IDE.
Build your plugin JAR via the Maven sidebar:
Maven → <Your Project> → Lifecycle → package
This generates a target/ directory containing two JARs:
your-plugin.jar— the one to deployoriginal-your-plugin.jar— the unshaded version, ignore this
Copy your-plugin.jar to run/plugins/.
Set up a run configuration so you can start the debug server directly from IDEA:
- Open Edit Configurations (top-right dropdown)
- Click + and choose JAR Application
- Fill in the fields:
| Field | Value |
|---|---|
| Name | Spigot 1.21.3 |
| Path to JAR | ./run/spigot-1.21.3.jar |
| Program arguments | nogui |
| Working directory | ./run |
Enable Allow multiple instances and Store as project file.
Click Debug. Once the server finishes loading, you should see your plugin's startup message in the console — confirming the plugin loaded successfully.
your-project/
├── src/
│ └── main/
│ ├── java/ # Plugin source code
│ └── resources/
│ └── plugin.yml
├── run/ # Local debug server (excluded from IDEA index)
│ ├── plugins/ # Drop your built JAR here
│ ├── server.properties
│ ├── eula.txt
│ └── start.bat
└── pom.xml
- Edit
src/main/java/.../YourPlugin.javato start building your plugin logic - Rebuild with
mvn packageand restart the server to test changes - Use the IDEA debugger with breakpoints for live debugging