Minecraft Spigot Plugin

1 min read minecraft

Lab note What I wrote down while learning this by building with it. Short by design; the code is in pfeilbr/minecraft-spigot-plugin-playground.

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)

  1. 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
  1. Launch Debug confifguration in IntelliJ

  1. Set breakpoints, etc. in code

  2. Launch minecraft and play

  3. Breakpoints will be hit.

    Use Evaluate Code Fragment to explore while debugger is paused

  4. You can edit code, save, and build (cmd-F9). It’ll live apply/hot swap without stopping server.

Resources

Get new guides and courses by email

An occasional email when I publish a new guide, course or post. No spam, and you can unsubscribe any time.

Sent with Buttondown. I never share your address. Prefer a feed? Use the RSS feed.