Skip to content

AdventureExtensions

This adds some useful extensions to the AdventureAPI.

Component

To create a component, you can use the component method. This method uses the Adventure Color Codes.

Main.kt
val component = component("Hello World")
Main.java
Component component = AdventureExtensions.component("Hello World");

Context

To get the context of a component, you can use the context method. This will return a String with the context of the component.

Main.kt
val context = context(component)
Main.java
String context = AdventureExtensions.context(component);