
KotlinFramework
Lightweight Kotlin framework for Paper plugin development. Less boilerplate, more plugin.
I built this because I kept copy-pasting the same companion object, instance setup, and registerEvents into every single plugin. It's not trying to replace anything, it just removes the repetitive parts.
Features
- Base class (
KotlinFramework) with automaticinstance, startup logging, and safe error handling - Inline command registration: no separate class for simple commands
- Inline event listening: no
@EventHandler, no separate Listener class KotlinCommandbase class for commands that need their own file- Scheduler helpers:
runLater,runTimer,runAsync - Config helpers:
saveLocation,getLocation,config,setConfig - Message helpers:
msg,broadcastMsg,colorizewith&color support
Installation
Add JitPack to your repositories and the framework as a dependency:
repositories {
maven("https://jitpack.io")
}
dependencies {
implementation("com.github.kolerz:kframework:1.0.0")
}
⚠️ Use
shadowJarto bundle the framework into your plugin jar, otherwise it won't load.
Quick example
class MyPlugin : KotlinFramework() {
override fun onStart() {
registerCommand("heal", playerOnly = true) {
player!!.health = 20.0
reply("&aHealed!")
}
registerCommand("broadcast", permission = "myplugin.broadcast") {
requireArgs(1, "/broadcast <message>") {
broadcastMsg("&8[&cBroadcast&8] &f${args.joinToString(" ")}")
}
}
registerListener {
on<PlayerJoinEvent> {
player.msg("&aWelcome, &f${player.name}&a!")
}
}
runTimer(0L, 20L * 60L * 5L) {
broadcastMsg("&eRemember to vote!")
}
}
}
Requirements
- Paper 1.21+
- Java 21+
- Kotlin 2.x
Source
License
MIT
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.21, 1.21.1, 1.21.2
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Modrinth — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
Verified by MCModsHub
- Ships as kframework-plugin.jar — drop this file into the mods folder
- Download size: 1.8 MB
- Download link checked 24 Aug 2026 — working
These come from our own check of the pack file, not from the source page.