https://github.com/itsdoot/adventure4k
KyoriPowered/adventure for kotlin users
https://github.com/itsdoot/adventure4k
Last synced: 9 months ago
JSON representation
KyoriPowered/adventure for kotlin users
- Host: GitHub
- URL: https://github.com/itsdoot/adventure4k
- Owner: ItsDoot
- License: mit
- Created: 2020-07-21T19:24:46.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-21T20:23:43.000Z (almost 6 years ago)
- Last Synced: 2025-03-28T19:25:07.116Z (over 1 year ago)
- Language: Kotlin
- Size: 63.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# adventure4k
A DSL and extensions to make using [adventure](https://github.com/KyoriPowered/adventure) in Kotlin a bit nicer.
## DSL Example
```kotlin
import net.kyori.adventure.text.TextComponent
import net.kyori.adventure.text.format.NamedTextColor
import net.kyori.adventure.text.format.TextDecoration
import pw.dotdash.adventure4k.dsl.text
val textComponent: TextComponent =
text("You're a ", color = NamedTextColor.GRAY) {
text("Bunny", color = NamedTextColor.LIGHT_PURPLE)
text("! Press ")
keybind("key.jump", color = NamedTextColor.LIGHT_PURPLE, decorations = setOf(TextDecoration.BOLD))
text(" to jump!")
}
```