2026-01-21 14:59:11 +01:00
2026-01-21 14:59:11 +01:00
2026-01-21 14:59:11 +01:00
2026-01-21 14:59:11 +01:00
2026-01-21 14:59:11 +01:00
2026-01-21 14:59:11 +01:00
2026-01-21 14:59:11 +01:00
2026-01-21 14:59:11 +01:00
2026-01-21 14:59:11 +01:00
2026-01-21 14:59:11 +01:00
2026-01-21 14:59:11 +01:00

Example Hytale Plugin

This is an example Hytale server plugin demonstrating the basic structure and setup.

Project Structure

example-mod/
├── app/
│   ├── src/
│   │   ├── main/
│   │   │   ├── java/org/example/
│   │   │   │   └── ExamplePlugin.java
│   │   │   └── resources/
│   │   │       └── plugin.json
│   │   └── test/
│   ├── build.gradle.kts
├── gradle/
├── server/
├── build.gradle.kts
├── settings.gradle.kts
└── gradlew / gradlew.bat

Setup

Pre-setup

# Download the hytale-downloader & cfr (DO IT ONCE) 
./setup --download

Setup

# Download the HytaleServer, finally located here ./server/HytaleServer.jar
./setup --setup

Decompile

# Decompile ./server/HytaleServer.jar to get the source, finally located here ./src-ref
./setup --decompile

Building

# Build the plugin
./gradlew build

# The JAR will be in app/build/libs/ExamplePlugin-1.0.0.jar

Installation

  1. Build the plugin with ./gradlew build
  2. Copy app/build/libs/ExamplePlugin-1.0.0.jar to your Hytale server's mods/ folder
  3. Start the server

Plugin Structure

manifest.json

The plugin manifest file defines metadata about your plugin:

{
  "Group": "org.example",
  "Name": "ExamplePlugin",
  "Version": "1.0.0",
  "Description": "An example Hytale server plugin",
  "Authors": [
    {
      "Name": "Your Name"
    }
  ],
  "Main": "org.example.ExamplePlugin",
  "ServerVersion": "*",
  "Dependencies": {},
  "OptionalDependencies": {},
  "DisabledByDefault": false,
  "IncludesAssetPack": false,
  "SubPlugins": []
}

Main Plugin Class

Your plugin class extends JavaPlugin and implements lifecycle methods:

  • setup() - Called during server setup, register configs here
  • start() - Called when plugin starts, register commands/events here
  • shutdown() - Called when plugin stops, cleanup resources here

Requirements

  • Java 25 or later
Description
No description provided
Readme 148 KiB
2026-01-21 15:08:01 +01:00
Languages
Java 97.2%
Shell 1.5%
PowerShell 1.3%