Hylib – Hytale Utility Library
Hylib is a lightweight utility library for Kotlin-based Hytale plugins. It provides event handling, storage helpers, codecs, and utilities to make plugin development smoother. Works with Java plugins too (some class names end in `Kt`).
Included Features
- Player events: PlayerLeftClickEvent, PlayerRightClickEvent, PlayerUseEvent (Use keybind, F by default)
- Command utilities: StringArgumentType
- Codecs: LocationCodec
- Internal packet/listener support: SyncInteractionChainsPacketListener, PacketWatcherService (do not interact directly)
- Utilities: TeleportUtil, DateTimeUtil
- Storage & JSON helpers: JsonStorage and internal identifiable system
- Main library object: Hylib.kt
Quick Start
Add Hylib via Maven Central:
repositories {
mavenCentral()
}
dependencies {
compileOnly("me.xcue:hylib:26.0.0")
}
Also include it in your plugin manifest.json:
{
"Dependencies": {
"xcue:Hylib": "^26.0.0"
}
}
Example Usage
Listen for the "RightClick" event:
import me.xcue.hylib.api.events.PlayerRightClickEvent
eventRegistry.register(PlayerRightClickEvent::class.java) { e ->
println("Player right clicked: ${e.playerRef.username}")
}
Other utilities like TeleportUtil and DateTimeUtil are ready to use directly.
⚠️ Internal packet listeners and watchers are handled automatically. Do not interact with them.
Recommended For
Kotlin Hytale plugin development. Lightweight, easy to integrate, and provides common utilities for events, storage, teleportation, and time handling.

