code for article pfeilbr/minecraft-spigot-plugin-playground
Learn plugin development for the spigot minecraft server.
Project Setup and Configuration
see Creating a blank Spigot plugin in IntelliJIDEA
Add spigot.jar
Artifacts
Remote Debug Configuration
Developing (hot swap/live coding)
- launch minecraft server in debug mode
cd ./minecraft-spigot-server
./start.command
# java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -jar spigot-1.12.2.jar
- Launch Debug confifguration in IntelliJ
-
Set breakpoints, etc. in code
-
Launch minecraft and play
-
Breakpoints will be hit.
Use Evaluate Code Fragment to explore while debugger is paused
-
You can edit code, save, and build (cmd-F9). It’ll live apply/hot swap without stopping server.
Twitter • Reddit