Skip to content
ZERNYTH.

Getting Started

Zernyth Engine runs Java plugins on Minecraft Bedrock Dedicated Server through Endstone. A plugin is a JAR with a plugin.yml and a class that extends JavaPlugin. This documentation describes API version 0.8.0.

What you need

  • Java 25 LTS. Eclipse Temurin 25 is preferred. See Java 25 Setup.
  • Gradle 9.1 or newer, or Maven.
  • The local SDK artifact dev.zernyth:api:0.8.0, built from the engine repository. See Gradle.

A first plugin

Declare the plugin in src/main/resources/plugin.yml. Plugin names use lowercase letters, digits and underscores.

name: example_plugin
version: 1.0.0
main: dev.example.ExamplePlugin

Then write the main class:

package dev.example;

import dev.zernyth.api.command.TypedCommand;
import dev.zernyth.api.plugin.JavaPlugin;
import dev.zernyth.api.text.Component;
import java.util.List;

public final class ExamplePlugin extends JavaPlugin {
    @Override
    public void onEnable() {
        var count = TypedCommand.Argument.integer("count", 1, 100).optional(3);
        new TypedCommand("example", "Example command", "example.use", false,
            List.of("ex"), List.of(count), List.of(), context -> {
                context.sender().sendMessage(Component.text("Count: " + context.get(count)));
                return true;
            }).register(getServer());
        getLogger().info("Enabled");
    }
}

Build and install

Build the JAR and copy it from build/libs/ into the server's plugins folder. The Zernyth API and runtime JARs belong on the JVM classpath, never inside your plugin.

Next, read about the Plugin Lifecycle.

Was this page helpful?