Skip to content

Releases: firesmasher-c6/CoderAddonSDK

Addon SDK 1.3.2

Choose a tag to compare

@firesmasher-c6 firesmasher-c6 released this 26 Jul 08:03
f6f1ca4

Coder Addon SDK

The official SDK for building addons for Coder — a Minecraft plugin that extends server functionality through a developer-friendly addon system.


Requirements

  • Java 21 or Java 25
  • Maven (or the included Maven wrapper)
  • A Minecraft server running the Coder plugin

Getting Started

1. Place the SDK JAR

Put CoderAddonSDK-1.2.8.jar inside your project at:

your-project/
└── .caddon/
    └── lib/
        └── CoderAddonSDK-1.2.8.jar

2. Place caddon.bat

Drop caddon.bat in your project root (same level as .caddon/).

3. Initialize your project

.\caddon.bat init

This will:

  • Ask which Java version you're targeting (Java-21 or Java-25)
  • Fetch the correct pom.xml from the Coder SDK repository and write it to your project root
  • Extract the Maven wrapper files (mvnw, mvnw.cmd) if buildTool=mvnw is set

4. Build your addon

.\caddon.bat package

This deletes the target/ folder and runs mvn package fresh.


caddon Commands

Command Description
caddon init Initialize project — fetches pom.xml and sets up the build tool
caddon package Clean build — deletes target/ and runs mvn package
caddon --daemon-start Start the background daemon
caddon --daemon-stop Stop all running daemons

Configuration

On first run, caddon init creates .caddon/CoderAddon-SDK.properties with the following defaults:

# Accepted values: mvn, mvnw
buildTool=mvnw
environment=windows

# Values: pwsh.exe, powershell.exe
commandLine=pwsh.exe

# Start a background daemon for auto-rebuild and Maven warm-up
daemon=false
daemon.memory=50mb
Property Description
buildTool mvnw uses the bundled Maven wrapper; mvn uses your system Maven
environment windows uses mvnw.cmd; linux uses mvnw
commandLine Shell used to run commands
daemon Set to true to enable the background daemon
daemon.memory Memory allocated to the daemon process (e.g. 50mb, 256mb)

Background Daemon

The daemon is an optional background process that makes development faster. Enable it by setting daemon=true in .caddon/CoderAddon-SDK.properties, then run:

.\caddon --daemon-start

The daemon does two things:

Maven warm-up — on startup it runs mvn validate to pre-load Maven's classloader and cache dependencies locally, so your next caddon package starts faster.

Auto-rebuild — watches src/main for changes to .java and .properties files. When a change is detected, it waits 2 seconds (to let you finish saving) then automatically runs mvn package. If you manually run caddon package at the same time, the daemon skips its rebuild to avoid conflicts.

Daemon output is written to .caddon/daemon.log.

To stop the daemon:

.\caddon --daemon-stop

Project Structure

your-addon/
├── caddon.bat                         # caddon CLI entry point
├── pom.xml                            # Generated by caddon init
├── .caddon/
│   ├── lib/
│   │   └── CoderAddonSDK-1.2.8.jar   # SDK JAR (place this here manually)
│   ├── patch/
│   │   └── patch_manifest.bat         # Patches Main-Class into the JAR manifest
│   ├── CoderAddon-SDK.properties      # SDK configuration
│   └── daemon.log                     # Daemon and auto-build output
└── src/
    └── main/
        └── java/
            └── com/yourname/youraddon/
                └── YourAddon.java

Building for Java 21 vs Java 25

When running caddon init you'll be asked to choose a Java version. This determines which pom.xml template is used:

  • Java-21 — targets the Paper 1.21.1 API with Coder API v2.4.1
  • Java-25 — targets the newer Coder API 26.x build

Make sure your local JDK matches the version you select.


Tips

  • The .caddon/ folder is managed by the SDK — don't edit files inside it manually except for CoderAddon-SDK.properties
  • daemon.log grows over time; it's safe to delete it and it will be recreated on next daemon start
  • If caddon package fails, re-run with mvnw package directly to see the full Maven output
  • The daemon's auto-rebuild uses -q (quiet) mode; full output goes to daemon.log

1.2.8

Choose a tag to compare

@firesmasher-c6 firesmasher-c6 released this 25 Jul 12:01
36f3219

Coder Addon SDK

The official SDK for building addons for Coder — a Minecraft plugin that extends server functionality through a developer-friendly addon system.


Requirements

  • Java 21 or Java 25
  • Maven (or the included Maven wrapper)
  • A Minecraft server running the Coder plugin

Getting Started

1. Place the SDK JAR

Put CoderAddonSDK-1.2.8.jar inside your project at:

your-project/
└── .caddon/
    └── lib/
        └── CoderAddonSDK-1.2.8.jar

2. Place caddon.bat

Drop caddon.bat in your project root (same level as .caddon/).

3. Initialize your project

.\caddon.bat init

This will:

  • Ask which Java version you're targeting (Java-21 or Java-25)
  • Fetch the correct pom.xml from the Coder SDK repository and write it to your project root
  • Extract the Maven wrapper files (mvnw, mvnw.cmd) if buildTool=mvnw is set

4. Build your addon

.\caddon.bat package

This deletes the target/ folder and runs mvn package fresh.


caddon Commands

Command Description
caddon init Initialize project — fetches pom.xml and sets up the build tool
caddon package Clean build — deletes target/ and runs mvn package
caddon --daemon-start Start the background daemon
caddon --daemon-stop Stop all running daemons

Configuration

On first run, caddon init creates .caddon/CoderAddon-SDK.properties with the following defaults:

# Accepted values: mvn, mvnw
buildTool=mvnw
environment=windows

# Values: pwsh.exe, powershell.exe
commandLine=pwsh.exe

# Start a background daemon for auto-rebuild and Maven warm-up
daemon=false
daemon.memory=50mb
Property Description
buildTool mvnw uses the bundled Maven wrapper; mvn uses your system Maven
environment windows uses mvnw.cmd; linux uses mvnw
commandLine Shell used to run commands
daemon Set to true to enable the background daemon
daemon.memory Memory allocated to the daemon process (e.g. 50mb, 256mb)

Background Daemon

The daemon is an optional background process that makes development faster. Enable it by setting daemon=true in .caddon/CoderAddon-SDK.properties, then run:

.\caddon --daemon-start

The daemon does two things:

Maven warm-up — on startup it runs mvn validate to pre-load Maven's classloader and cache dependencies locally, so your next caddon package starts faster.

Auto-rebuild — watches src/main for changes to .java and .properties files. When a change is detected, it waits 2 seconds (to let you finish saving) then automatically runs mvn package. If you manually run caddon package at the same time, the daemon skips its rebuild to avoid conflicts.

Daemon output is written to .caddon/daemon.log.

To stop the daemon:

.\caddon --daemon-stop

Project Structure

your-addon/
├── caddon.bat                         # caddon CLI entry point
├── pom.xml                            # Generated by caddon init
├── .caddon/
│   ├── lib/
│   │   └── CoderAddonSDK-1.2.8.jar   # SDK JAR (place this here manually)
│   ├── patch/
│   │   └── patch_manifest.bat         # Patches Main-Class into the JAR manifest
│   ├── CoderAddon-SDK.properties      # SDK configuration
│   └── daemon.log                     # Daemon and auto-build output
└── src/
    └── main/
        └── java/
            └── com/yourname/youraddon/
                └── YourAddon.java

Building for Java 21 vs Java 25

When running caddon init you'll be asked to choose a Java version. This determines which pom.xml template is used:

  • Java-21 — targets the Paper 1.21.1 API with Coder API v2.4.1
  • Java-25 — targets the newer Coder API 26.x build

Make sure your local JDK matches the version you select.


Tips

  • The .caddon/ folder is managed by the SDK — don't edit files inside it manually except for CoderAddon-SDK.properties
  • daemon.log grows over time; it's safe to delete it and it will be recreated on next daemon start
  • If caddon package fails, re-run with mvnw package directly to see the full Maven output
  • The daemon's auto-rebuild uses -q (quiet) mode; full output goes to daemon.log