Komponent

An easy to use, fast and lightweight Minecraft chat component library

License

License

GroupId

GroupId

me.bardy
ArtifactId

ArtifactId

komponent
Last Version

Last Version

1.1.1
Release Date

Release Date

Type

Type

pom.sha512
Description

Description

Komponent
An easy to use, fast and lightweight Minecraft chat component library

Download komponent

Dependencies

runtime (2)

Group / Artifact Type Version
org.jetbrains.kotlin : kotlin-stdlib jar 1.4.30
org.jetbrains.kotlinx : kotlinx-serialization-json-jvm jar 1.0.1

Project Modules

There are no modules declared in this project.

Komponent

An easy to use, fast and lightweight Minecraft chat component library, written in Kotlin

Dependency

Komponent is now on Maven Central. You can retrieve it like this:

  • Gradle
repositories {
    mavenCentral()
}

dependencies {
    implementation 'me.bardy:komponent'
}

Usage

Komponent has it's own DSL, for easy component creation, in a very idiomatic way.

textComponent("I am text!") {
    color = NamedColor.BLACK
    formatting {
        bold = true
        italic = true
        underlined = false
        strikethrough = true
        obfuscated = false
    }
    insertion = "I am insertion text!"
    clickEvent = openURL("https://example.com")
    hoverEvent = showText("I am hover text!")

    translation("i.am.a.translation.key") {
        color = NamedColor.WHITE
    }

    keybind("key.forward") {
        color = Color.fromHex("#ff6600")
    }
}

Versions

Version
1.1.1
1.1
1.0