Skip to content

Hytale Plugin Development FAQ

Quick answers to common questions about Hytale server plugin development with Java.

What do I need to start developing Hytale plugins?

Section titled “What do I need to start developing Hytale plugins?”

You’ll need:

  • Hytale Launcher (installed and updated)
  • Java 25 SDK (JDK 25)
  • IntelliJ IDEA (Community or Ultimate edition)
  • A GitHub account (for cloning templates)

See the Get Started guide for detailed setup instructions.

Yes! Use the official template:

Terminal window
git clone https://github.com/realBritakee/hytale-template-plugin.git MyPlugin

This template includes automatic server setup and proper configuration.

Do I need to know Java to create Hytale plugins?

Section titled “Do I need to know Java to create Hytale plugins?”

For native plugins, yes. However, if you prefer JavaScript, check out SimpleScripting which lets you create mods without Java.

How long does it take to learn plugin development?

Section titled “How long does it take to learn plugin development?”

If you already know Java:

  • Basic plugins (commands, events): 1-2 days
  • Intermediate (custom UI, data storage): 1-2 weeks
  • Advanced (ECS systems, complex mechanics): 1-2 months

If you’re new to Java, add 2-4 weeks to learn the language basics first.

Use a clear, descriptive name in PascalCase (e.g., MyAwesomePlugin). Configure it in:

  • settings.gradle: Set rootProject.name
  • gradle.properties: Set maven_group (use reverse domain like com.yourname)
  • manifest.json: Set “Name” and “Main” class path

All code goes in src/main/java/ following your package structure:

src/main/java/com/yourname/myplugin/
├── MyPlugin.java (main class)
├── commands/
├── events/
└── ui/

The manifest defines your plugin metadata:

{
"Main": "com.yourname.MyPlugin",
"Name": "My Plugin",
"Version": "1.0.0"
}

It must be in src/main/resources/manifest.json.

Add them to build.gradle:

dependencies {
implementation 'some.library:artifact:version'
}

Then reimport your Gradle project in IntelliJ.

Register commands in your plugin’s main class:

public class MyPlugin extends ServerPlugin {
@Override
public void onEnable() {
// Register command
}
}

See the Commands guide for complete examples.

Yes! Hytale supports type-safe command arguments with automatic parsing and validation. You can use integers, strings, players, locations, and more.

How do I restrict commands to admins only?

Section titled “How do I restrict commands to admins only?”

Implement permission checks in your command executor:

if (!sender.hasPermission("myplugin.admin")) {
sender.sendMessage("No permission");
return;
}

Yes! You can build command hierarchies like /myplugin reload or /shop buy item.

Implement event listeners in your plugin:

@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();
// Handle event
}

Register your listener class during plugin initialization.

Common events include:

  • Player events (join, quit, chat, movement)
  • Entity events (spawn, death, damage)
  • Block events (place, break, interact)
  • World events (load, unload, chunk events)
  • ECS events (component changes, system ticks)

Yes! Many events are cancellable:

@EventHandler
public void onBlockBreak(BlockBreakEvent event) {
if (someCondition) {
event.setCancelled(true);
}
}

Extend the appropriate event base class and dispatch it through the event system. Custom events are useful for cross-plugin communication.

Yes! Hytale has a powerful custom UI system. See the UI Overview for details.

For detailed UI questions, check the Custom UI FAQ which covers:

  • UI files and syntax
  • InteractiveCustomUIPage
  • Dynamic content and lists
  • BuilderCodec
  • Styling and troubleshooting

ECS (Entity Component System) is Hytale’s architecture for game logic. It separates data (components) from behavior (systems), making code more modular and performant.

See ECS Overview for a complete introduction.

Not always! Simple plugins (commands, basic events) don’t require ECS. But for:

  • Custom entity behaviors
  • Per-tick logic
  • Complex game mechanics
  • Data serialization

…you’ll want to use ECS.

Define a component class and register it:Use it for custom entity behaviors, per-tick logic, complex game mechanics, and data serialization.

For detailed ECS questions, check the ECS FAQ which covers:

  • Components, systems, and queries in depth
  • Entities and archetypes
  • ECS events and CommandBuffer
  • Performance optimization
  • Best practices

Does SimpleScripting have database support?

Section titled “Does SimpleScripting have database support?”

Yes! SimpleScripting provides a per-mod SQLite database. See Database API.

Store player data using UUIDs as keys:

  • In config files: players.yml with UUID keys
  • In databases: UUID column as primary key
  • In memory: Map<UUID, PlayerData> (remember to serialize on shutdown)

No. You must implement saving/loading:

  • Save on PlayerQuitEvent or periodically
  • Load on PlayerJoinEvent
  • Serialize on server shutdown

Key tips:

  • Cache expensive operations (don’t recalculate every tick)
  • Use efficient data structures (Maps instead of Lists for lookups)
  • Batch operations when possible
  • Avoid object creation in hot paths
  • Use async tasks for heavy operations
  • Profile your code to find bottlenecks

Yes, for:

  • Database queries
  • File I/O
  • HTTP requests
  • Heavy calculations

No, for:

  • Anything that modifies game state (must be on main thread)
  • Fast operations (< 1ms)

Follow the single responsibility principle: each plugin should do one thing well. Multiple small, focused plugins are better than one giant plugin.

Both work! Kotlin offers:

  • Cleaner syntax
  • Null safety
  • Extension functions
  • Coroutines

Java offers:

  • Wider community support
  • More examples
  • Slightly better IDE support

Choose based on your team’s expertise.

  1. Local server: Use the template’s auto-setup to test locally
  2. Console logging: Add debug statements
  3. Breakpoints: Use IntelliJ’s debugger
  4. Unit tests: Write tests for complex logic

My plugin won’t load. What should I check?

Section titled “My plugin won’t load. What should I check?”

Common issues:

  1. manifest.json: Verify “Main” class path is correct
  2. Package structure: Ensure classes are in the right packages
  3. Dependencies: Check all required libraries are included
  4. Build errors: Look at build output for compilation errors
  5. Server logs: Read the full error message

Check the server console and log files. Exceptions will show:

  • The error type
  • The stack trace
  • The line number where it occurred

Yes! IntelliJ supports attaching the debugger to your test server. Set breakpoints in your code and they’ll pause execution.

  1. Build your plugin: ./gradlew build
  2. Find the JAR in build/libs/
  3. Share the JAR file
  4. Users place it in their plugins/ folder

Yes! GitHub provides:

  • Version control
  • Issue tracking
  • Release distribution
  • Community contributions

Include version checking in your plugin:

  1. Store current version in manifest.json
  2. Check for config/data migrations needed
  3. Handle backwards compatibility
  4. Provide changelog for users

Not built-in, but you can implement update checking by:

  • Querying GitHub releases API
  • Notifying admins of new versions
  • Consider using a plugin manager system

Yes! Use:

  • Events: Other plugins can listen to your events
  • APIs: Expose public methods/interfaces
  • Shared Services (SimpleScripting): Cross-plugin communication
  • Dependencies: Declare required plugins in manifest

Create a public API package:

com.yourname.myplugin.api/
├── MyPluginAPI.java
├── events/
└── data/

Document it well and maintain backwards compatibility.

Can Java plugins interact with JavaScript mods?

Section titled “Can Java plugins interact with JavaScript mods?”

Yes, through SimpleScripting’s Shared Services system. Both can register and consume services.


Last updated: February 2026