Description
Kytale
Kotlin framework for Hytale server plugin development.
Kytale bundles the Kotlin runtime and provides idiomatic DSLs to build plugins, gameplay systems, UI, commands, events, configuration, and more - all with first-class Kotlin support.
View Source and Full Documentation on GitHub
✨ Features
- Kotlin Runtime - stdlib, reflect, coroutines (2.2.0), kotlinx.serialization
- Event DSL - Type-safe event subscriptions with reified generics
- Command DSL - Structured commands with async / coroutine support
- Config DSL - JSON configuration via property delegates
- Scheduler DSL - Coroutine-based task scheduling
- UI DSL - Compile-time UI generation and interactive elements
- Hexweave - Optional helper layer for player events, commands, tasks, ECS systems
- Extensions - Utilities for entities, vectors, velocity, targeting, damage
🛠️ Quick Start
Gradle Setup
Add Kytale to your build.gradle.kts:
plugins {
kotlin("jvm") version "2.2.0"
kotlin("plugin.serialization") version "2.2.0"
id("hytale-mod") version "0.+"
}
repositories {
mavenCentral()
maven("https://cursemaven.com")
maven("https://maven.hytale-modding.info/releases")
}
dependencies {
compileOnly("curse.maven:kytale-PROJECTID:FILEID")
}
Runtime Dependency
Add Kytale to your manifest.json:
{
"Dependencies": {
"AmoAster:Kytale": "*"
}
}
Example Plugin
class MyPlugin(init: JavaPluginInit) : KotlinPlugin(init) {
override fun setup() {
super.setup()
event<PlayerConnectEvent> { event ->
logger.info { "Player connected: ${event.playerRef.uuid}" }
}
command("greet", "Greet the player") {
executes { ctx ->
ctx.sendMessage(Message.raw("Hello!"))
}
}
}
}
📌 Lifecycle
- Constructor - Setup basic state
- setup() - Register events, commands, UI
- start() - Post-initialization
- shutdown() - Cleanup
📘 Learn More
Full documentation, project structure, DSL examples, UI system, and advanced usage are available on GitHub: https://github.com/briarss/Kytale/tree/main
📄 License
MIT License


