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

2.6 KiB

title, layout
title layout
Hytale Plugin Documentation hextra-home

{{< hextra/hero-badge >}} Hytale Server API {{< /hextra/hero-badge >}}

{{< hextra/hero-headline >}} Build Plugins for Hytale {{< /hextra/hero-headline >}}
{{< hextra/hero-subtitle >}} Comprehensive documentation for creating Hytale server plugins. 
From your first plugin to advanced features. {{< /hextra/hero-subtitle >}}
 
{{< hextra/hero-button text="Join Discord" link="https://discord.gg/4UPCz84Nst" icon="discord" >}}
 

Explore the Documentation

 

{{< hextra/feature-grid >}} {{< hextra/feature-card title="Getting Started" subtitle="Set up your environment and create your first plugin" link="getting-started" icon="play"

}} {{< hextra/feature-card title="Core Concepts" subtitle="Registries, assets, codecs, commands, events, and tasks" link="core-concepts" icon="cube" }} {{< hextra/feature-card title="Gameplay Systems" subtitle="Farming, shops, reputation, memories, and objectives" link="gameplay-systems" icon="puzzle" }} {{< hextra/feature-card title="World" subtitle="Universes, chunks, blocks, entities, worldgen, and portals" link="world" icon="globe" }} {{< hextra/feature-card title="UI Systems" subtitle="HUD, custom pages, windows, inventory, and permissions" link="ui-systems" icon="desktop-computer" }} {{< hextra/feature-card title="Advanced" subtitle="Networking, effects, particles, and dynamic lights" link="advanced" icon="lightning-bolt" }} {{< hextra/feature-card title="Reference" subtitle="API reference, manifest schema, and registries" link="reference" icon="book-open" }} {{< /hextra/feature-grid >}}

 

Quick Example

Here's a simple plugin that logs a message when a player joins:

public class MyPlugin extends JavaPlugin {
    @Override
    public void start() {
        getEventRegistry().register(PlayerConnectEvent.class, event -> {
            PlayerRef playerRef = event.getPlayerRef();
            getLogger().at(Level.INFO).log("Player connecting: " + playerRef.getUsername());
        });
    }

    @Override
    public void shutdown() {
        getLogger().at(Level.INFO).log("Plugin is shutting down!");
    }
}