Welcome to HytaleLoader - a powerful plugin loader and API wrapper for Hytale servers!
- Getting Started - Installation and first plugin
- Events - Event system overview
- Standard Events - Player events reference
- Commands - Command system guide
- Server Setup - Server configuration
- Server API - Server utility class
- Player API - Complete player management reference
- Block API - Block manipulation and interaction
- Location API - 3D position and rotation system
- Entity API - Entity management and interaction
- World API - World wrapper and utilities
- Redis API - Remote Redis database management
- MySQL API - MySQL database management
- UI API
- Scheduler API - Task scheduling and execution
- Permission API - Permission management system
- Command Utils - Command helper utilities
- Player Stats API - Health, stamina, mana management
- Config API - YAML configuration system
- CHANGELOG - Version history
Simplified wrapper for player management:
Player player = event.getPlayer();
// Identity
String name = player.getName();
UUID uuid = player.getUUID();
// Messaging
player.sendMessage("Hello!");
// Location & Teleportation
Location loc = player.getLocation();
player.teleport(new Location(loc.getWorld(), 100, 64, 200));
// Inventory
Inventory inv = player.getInventory();
// Permissions
boolean hasPermission = player.hasPermission("myplugin.admin");
// Stats
float health = player.getHealth();
player.setHealth(20.0f);// Get player location
Location loc = player.getLocation();
double x = loc.getX();
double y = loc.getY();
double z = loc.getZ();
World world = loc.getWorld();
// Create and teleport
Location spawn = new Location(world, 0, 100, 0, 0, 0);
player.teleport(spawn);
// Distance calculations
double distance = loc1.distance(loc2);// Get player inventory
InventoryPlayer inv = new InventoryPlayer(player);
// Get items
List<Item> items = inv.getItems();
Item item = inv.getItem(slot);
// Modify inventory
inv.addItem(item);
inv.clear(); // Note: May cause issues during join eventpublic class MyPlugin extends SimplePlugin {
@EventHandler
public void onJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();
player.sendMessage("Welcome " + player.getName() + "!");
}
@EventHandler
public void onBlockBreak(BreakBlockEvent event) {
// Handle block break
event.setCancelled(true); // Cancel the event
}
}@Command(name = "tp", description = "Teleport command")
public void teleportCommand(CommandContext context) {
context.sendMessage("Teleporting...");
}PlayerJoinEvent- When a player joinsPlayerQuitEvent- When a player leavesPlayerChatEvent- When a player sends a chat messagePlayerDamageEvent- When a player takes damagePlayerCraftEvent- When a player crafts (deprecated)PlayerMouseButtonEvent- When a player clicked (left or right click)PlayerMouseMotionEvent- When a player moved the mouse
BreakBlockEvent- When a block is brokenPlaceBlockEvent- When a block is placedUseBlockEvent- When a block is used/interacted withDamageBlockEvent- When a block takes damage
DropItemEvent- When an item is droppedDiscoverZoneEvent- When a zone is discoveredCraftRecipeEvent- When a recipe is craftedSwitchActiveSlotEvent- When switching elements in inventory
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
│ │ │ ├── Arg.java # Argument annotation
│ │ │ ├── Command.java # Command annotation
│ │ │ ├── CommandScanner.java# Command scanner
│ │ │ ├── CommandUtils.java # Command utilities
│ │ │ └── SimpleCommand.java # Command base
│ │ ├── config/ # Configuration system
│ │ ├── datastorage/ # Data storage
│ │ │ ├── MySQLClient.java # MySQL client
│ │ │ └── RedisClient.java # Redis client
│ │ ├── event/ # Event system
│ │ ├── internal/ # Internal dispatchers
│ │ ├── permission/ # Permission system
│ │ │ ├── Permission.java # Permission object
│ │ │ └── PermissionManager.java # Permission storage
│ │ ├── plugin/ # Plugin base classes
│ │ ├── scheduler/ # Task scheduling
│ │ │ ├── Scheduler.java # Scheduler implementation
│ │ │ └── ScheduledTask.java # Task wrapper
│ │ └── utils/ # Utilities
└── TestMod/ # Example mod
Add HytaleLoader as a dependency in your pom.xml:
<dependency>
<groupId>fr.hytale.loader</groupId>
<artifactId>HytaleLoader</artifactId>
<version>1.0.5</version>
<scope>provided</scope>
</dependency>For issues, questions, or contributions, please visit the GitHub repository.