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!
This is an unofficial modding tool for Hytale. Hytale is in alpha and APIs may change.
- Annotation-based Event Handling: Use
@EventHandlerto easily register event listeners - Annotation-based Command Registration: Use
@Commandto define commands with metadata - SimplePlugin Base Class: Automatic lifecycle management and component registration
- Configuration System: YAML and JSON config support with automatic loading
- 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)
- Redis API: Connection pooling, String/Hash/List/Set operations
- MySQL API: Connection pooling, prepared statements, transactions, batch operations
- 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
git clone https://github.com/Program132/HL.git
cd HytaleLoader
mvn clean installAdd the following to your pom.xml:
<dependency>
<groupId>fr.hytale.loader</groupId>
<artifactId>HytaleLoader</artifactId>
<version>1.0.5</version>
<scope>provided</scope>
</dependency>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!"));
}
}Comprehensive documentation is available in the doc/ directory:
- 📖 README - Complete documentation overview
- 🚀 Getting Started - Installation and first plugin
- 📝 Changelog - Version history
- 👤 Player API - Player management
- 🌍 World API - World manipulation
- 🧱 Block API - Block operations
- 📍 Location API - Position and rotation
- 👾 Entity API - Entity management
- 📊 Player Stats API - Health, stamina, mana
- 🔴 Redis API - Redis database
- 🐬 MySQL API - MySQL database
- 🎪 Event System - Event handling
- ⚔️ Command System - Command registration
- 🕐 Scheduler API - Task scheduling
- 🔐 Permission API - Permissions
- 🛠️ Command Utils - Command helpers
- 📝 Config API - Configuration system
- 📦 Standard Events - Available events
- JavaDoc - Full API reference
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/HL/
├── HytaleLoader/ # Core library
│ ├── src/main/java/fr/hytale/loader/
│ │ ├── api/ # Public API
│ │ │ ├── Player.java # Player wrapper
│ │ │ ├── Entity.java # Entity wrapper
│ │ │ ├── World.java # World wrapper
│ │ │ ├── Block.java # Block wrapper
│ │ │ ├── Location.java # Location wrapper
│ │ │ └── inventory/ # Inventory classes
│ │ ├── datastorage/ # Data storage
│ │ │ ├── RedisClient.java # Redis client
│ │ │ └── MySQLClient.java # MySQL client
│ │ ├── command/ # Command system
│ │ ├── event/ # Event system
│ │ ├── config/ # Configuration system
│ │ ├── permission/ # Permission system
│ │ ├── scheduler/ # Task scheduling
│ │ └── plugin/ # Plugin base classes
└── TestMod/ # Example mod
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.
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