Skip to content

Program132/HL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HytaleLoader

HytaleLoader is a Java library designed to simplify the development of mods for the Hytale server. It provides an abstraction layer inspired by the Bukkit/Spigot API, allowing developers to create mods using annotations for event handling and command registration and much more!

⚠️ Disclaimer

This is an unofficial modding tool for Hytale. Hytale is in alpha and APIs may change.

Hytale Version Compatibility

Note: HytaleLoader can be incomaptible if you don't download the correct version for your Hytale version. You can find the correct version in the releases page.

HytaleLoader Version Hytale Version
1.0.7 (Unreleased) 2026.01.17
1.0.6 1.0.0 (2026.01.13)
1.0.5 1.0.0 (2026.01.13)
1.0.4 1.0.0 (2026.01.13)
1.0.3 1.0.0 (2026.01.13)
1.0.2 1.0.0 (2026.01.13)
1.0.1 1.0.0 (2026.01.13)
1.0.0 1.0.0 (2026.01.13)

Features

Core Systems

  • Annotation-based Event Handling: Use @EventHandler to easily register event listeners
  • Annotation-based Command Registration: Use @Command to define commands with metadata
  • SimplePlugin Base Class: Automatic lifecycle management and component registration
  • Configuration System: YAML and JSON config support with automatic loading

Player & World APIs

  • Player API: Comprehensive player management with inventory, permissions, and stats
  • Entity API Base entity class with location, teleportation, and removal
  • World API World wrapper with block manipulation and entity spawning
  • Block API Block class
  • Location API: 3D position and rotation handling
  • Player Stats API: Health, stamina, oxygen, mana management (thread-safe)
  • Particle API: Particle effects to players / world
  • Sound API: Sound effects to players
  • Weather & Time API: Weather and time management (day, night, rain, etc.)

Data Storage

  • Redis API: Connection pooling, String/Hash/List/Set operations
  • MySQL API: Connection pooling, prepared statements, transactions, batch operations

Advanced Features

  • Scheduler System: Execute tasks immediately, delayed, or periodically (sync and async)
  • Permission System: Hierarchical permission management with wildcards
  • Command Utilities: Helper methods for command development
  • Item & Inventory System: Easy-to-use API for managing inventories and items
  • Maven Support: Easily integrate into your project
  • WebRequest API: Perform web requests using WebRequests class

Installation

Building locally

git clone https://github.com/Program132/HL.git
cd HytaleLoader
mvn clean install

Adding dependency

Add the following to your pom.xml:

<dependency>
    <groupId>fr.hytale.loader</groupId>
    <artifactId>HytaleLoader</artifactId>
    <version>1.0.5</version>
    <scope>provided</scope>
</dependency>

Quick Start

Basic Plugin

public class MyMod extends SimplePlugin {

    public MyMod(JavaPluginInit init) {
        super(init);
    }

    @Override
    public void onEnable() {
        getLogger().info("MyMod enabled!");
    }

    @EventHandler
    public void onPlayerJoin(PlayerJoinEvent event) {
        Player player = event.getPlayer();
        player.sendMessage("Welcome " + player.getName() + "!");
        
        // Get player location
        Location loc = player.getLocation();
        player.sendMessage("You are at: " + loc.getX() + ", " + loc.getY() + ", " + loc.getZ());
    }

    @Command(name = "hello", description = "Says hello")
    public void onHello(CommandContext ctx) {
        ctx.sender().sendMessage(Message.raw("Hello World!"));
    }
}

Documentation

Comprehensive documentation is available in the doc/ directory:

Getting Started

Core APIs

Data Storage

Systems

Reference

Development Workflow

To compile and deploy your mod (Windows):

mvn clean install -f HytaleLoader/pom.xml; mvn clean package -f TestMod/pom.xml; Copy-Item -Force TestMod/target/TestMod-1.0.5.jar server/mods/

Project Structure

HL/
├── HytaleLoader/              # Core library
│   ├── src/main/java/fr/hytale/loader/
│   │   ├── api/               # Public API
│   │   │   ├── inventory/     # Inventory classes
│   │   │   ├── ui/            # UI classes
│   │   │   ├── Block.java     # Block wrapper
│   │   │   ├── ChatColor.java # Chat color enums
│   │   │   ├── Entity.java    # Entity wrapper
│   │   │   ├── GameMode.java  # GameMode enum
│   │   │   ├── Item.java      # Item wrapper
│   │   │   ├── Location.java  # Location wrapper
│   │   │   ├── Player.java    # Player wrapper
│   │   │   ├── Server.java    # Server wrapper
│   │   │   ├── SoundCategory.java # Sound categories
│   │   │   ├── Time.java      # Time wrapper
│   │   │   ├── WeatherType.java # Weather types
│   │   │   └── World.java     # World wrapper
│   │   ├── command/           # Command system
│   │   ├── config/            # Configuration system
│   │   ├── datastorage/       # Data storage
│   │   ├── event/             # Event system
│   │   ├── internal/          # Internal dispatchers
│   │   ├── permission/        # Permission system
│   │   ├── plugin/            # Plugin base classes
│   │   ├── scheduler/         # Task scheduling
│   │   └── utils/             # Utilities
└── TestMod/                   # Example mod

Contributing

Contributions are welcome! Feel free to:

  • Open issues for bugs or feature requests
  • Submit pull requests
  • Improve documentation
  • Share your plugins made with HytaleLoader

See CHANGELOG.md for detailed version history.

Support

For support, questions, or to showcase your plugins:

  • Open an issue on GitHub
  • Check the documentation in doc/

Made with ❤️ for the Hytale modding community

About

HL is a Hytale library to create mods easily

Resources

Stars

Watchers

Forks

Languages