Files
Documentation/content/reference/_index.en.md
2026-01-20 20:33:59 +01:00

2.2 KiB

title, type, weight
title type weight
Reference docs 7

Complete API reference and documentation for Hytale plugin development.

{{< cards >}} {{< card link="manifest-schema" title="Manifest Schema" subtitle="Complete plugin.json specification" >}} {{< card link="all-registries" title="All Registries" subtitle="Complete registry listing" >}} {{< card link="buildertools" title="Builder Tools" subtitle="Creative mode construction tools" >}} {{< /cards >}}

API Overview

Hytale provides a comprehensive Java API for plugin development:

Core Systems

  • PluginBase - Base class for all plugins
  • Universe/World - World management
  • Entity/Player - Entity handling
  • Events - Event system
  • Commands - Command framework

Registries

Access game systems through typed registries:

public class MyPlugin extends PluginBase {
    @Override
    public void start() {
        // All registries accessible via PluginBase
        EventRegistry events = getEventRegistry();
        CommandRegistry commands = getCommandRegistry();
        TaskRegistry tasks = getTaskRegistry();
        AssetRegistry assets = getAssetRegistry();
        BlockStateRegistry blocks = getBlockStateRegistry();
        CodecRegistry codecs = getCodecRegistry();
    }
}

Quick Reference

Plugin Lifecycle

Method Called When
setup() Before start, for pre-initialization
start() Plugin is enabled
shutdown() Plugin is disabled

Event Priorities

Priority Value Use Case
FIRST -21844 Pre-processing, logging
EARLY -10922 Early modifications
NORMAL 0 Standard handlers
LATE 10922 Late modifications
LAST 21844 Final processing, cleanup

Common ArgTypes

Type Description
BOOLEAN true/false
INTEGER Whole numbers
DOUBLE Decimal numbers
STRING Single word text
GREEDY_STRING Multi-word text
PLAYER_REF Online player
WORLD World name
ENTITY_ID Entity UUID

See Command Arguments for the complete list.

External Resources

  • Hytale Official Website
  • Plugin Development Forum
  • Community Discord