Skip to content

Releases: PleaseInsertNameHere/PNX-APT

v0.0.1 - Initial Release

01 Mar 12:05
051de2b

Choose a tag to compare

Annotation Processing Tool for PowerNukkitX plugins.

PNX-APT removes boilerplate from your plugin development by generating code at compile time. Annotate your classes and let the processor handle the rest.


Features

@PluginMeta

Generate your plugin.yml entirely from code — no more maintaining a separate YAML file.

@PluginMeta(
    name = "MyPlugin",
    version = "1.0.0",
    api = {"2.0.0"},
    authors = {"Steve"},
    description = "My cool plugin"
)
public class MyPlugin extends PluginBase { }

Supports all standard fields: name, version, api, authors, description, website, prefix, depend, softDepend, loadBefore, order, and features.

@AutoListener

Automatically register event listeners — no manual registerEvents() calls needed.

@AutoListener
public class PlayerJoinListener implements Listener {
    @EventHandler
    public void onJoin(PlayerJoinEvent event) {
        event.getPlayer().sendMessage("Welcome!");
    }
}

@Scheduler

Auto-register and schedule tasks on classes or static methods.

@Scheduler(delay = 20, period = 100, async = true)
public class MyTask extends Task {
    @Override
    public void onRun(int currentTick) { }
}

Also works on public static methods:

@Scheduler(delay = 20, period = 100)
public static void myScheduledMethod() { }

Requirements

  • Java 21+
  • PowerNukkitX 2.0.0-SNAPSHOT or later

Installation

Available via JitPack. See the README for Maven and Gradle setup instructions.