Skip to content

Hey there! If you like my work, you can support me by sponsoring me on GitHub. Thanks! ❤

Sponsor me
on GitHub

Adventure Platform

LiteCommands Adventure Platform is an extension for supporting Kyori Adventure features for platforms that are doesn't have native support for it. E.g. Bukkit, BungeeCord, etc.

IMPORTANT

Make sure you have read the Adventure Kyori page before using this extension.

Add Dependency

kotlin
implementation("dev.rollczi:litecommands-adventure-platform:3.9.1")
groovy
implementation "dev.rollczi:litecommands-adventure-platform:3.9.1"
xml
<dependency>
    <groupId>dev.rollczi</groupId>
    <artifactId>litecommands-adventure-platform</artifactId>
    <version>3.9.1</version>
</dependency>

Registering the extension

Register the extension in the LiteCommands builder:

java
.extension(new LiteAdventurePlatformExtension<>(this.audienceProvider), config -> config
    .miniMessage(true)
    .legacyColor(true)
    .colorizeArgument(true)
    .serializer(this.miniMessage)
)
  • audienceProvider - the provider for the Audience object. If you don't have it, read the Adventure Platform page for more information.

  • miniMessage() - enables the MiniMessage support. (<red>, <gradient:red:blue>, <#ff0000>, etc.)

  • legacyColor() - enables the legacy color support. &c, &a, etc.

  • colorizeArgument() - enables the default colorizer for the @Arg Component argument.

  • serializer() - sets the custom serializer (colorizer) for the @Arg Component argument. (if replaced, the miniMessage() and legacyColor() will be ignored)

Full Example

See this full example to check how to use this extension in your project.

Made by LiteDevelopers and Contributors with ❤️