Menu
 

Does Hytale Support Lua? Server Modding Is Java Plugins

Does Hytale Support Lua? Server Modding Is Java Plugins

Short answer: no. The Hytale server has no Lua runtime and no Lua scripting API. This is read from the server files of build 0.7.3: there is no Lua engine among its classes or bundled libraries, and no command, config key or manifest field refers to Lua scripts. Guides that show main.lua, hytale.events.onPlayerJoin or /mod reload describe an API that does not exist. Server-side mods are Java plugins, and content mods are asset packs.

What a Hytale server mod is

  • Plugin: a .jar file in the server's mods/ folder (more folders can be added with --mods <dir>). Its Java code runs inside the server.
  • Asset pack: new or changed game content such as items, models and recipes. A plugin can ship one; its manifest then sets IncludesAssetPack.
  • Early plugin: loaded before the server starts. The server calls this unsupported and may become unstable, so it only loads them if you start it with --accept-early-plugins, from folders given with --early-plugins.

The plugin manifest

Every plugin jar contains a manifest.json. The fields the server reads are Group, Name, Version, Description, Authors, Website, Main (the plugin's Java class), ServerVersion, Dependencies, OptionalDependencies, DisabledByDefault, LoadBefore, IncludesAssetPack and SubPlugins. The plugin's id is made from its group and name.

What a plugin can do

A plugin extends the server's JavaPlugin class and implements setup(), start() and shutdown(). From there it gets a logger, its own data directory, a command registry and an event registry, so it can add commands and react to events. Commands a plugin registers get permission nodes under the plugin's own base permission, which you grant through permissions.json like any other.

Managing plugins on a running server

  • /plugin list (aliases /plugins and /pl) lists what is loaded.
  • /plugin load <name>, /plugin unload <name> and /plugin reload <name> change one plugin without a restart, and answer with "Plugin ... loaded!" or "Failed to load plugin ...".
  • In config.json, Mods (and Plugins) hold one entry per plugin with Enabled and RequiredVersion, and DefaultModsEnabled sets the default for plugins with no entry.
  • --ignore-broken-mods lets the server start even when a plugin fails to load.

Where to learn the real API

Read the server's own help and the official modding documentation; the plugin API changes during Early Access, so check a plugin against the server version in its ServerVersion field. Check logs/ after adding a plugin: a plugin that fails to load is reported there by name.

Want a server for your plugins? Host a Hytale server on Supercraft, with file access to the mods/ folder and a live console.

Tired of fighting this issue every patch?

Run a managed Hytale server with us. We handle the patches, mod-version pinning, save backups, and DDoS protection. Set up in minutes, multiple datacenter regions, no contract.

See Hytale hosting plans →
Top