Small and effective Color API for your plugins.
Only 1.16+ version of spigot support!
Make sure you reloaded maven or gradle in your project.
You need to add this dependency into your plugin, then look at under the dependencies example
Maven
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.ForestTechMC</groupId>
<artifactId>ForestColorAPI</artifactId>
<version>VERSION</version>
<scope>compile</scope>
</dependency>
</dependencies>Gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.ForestTechMC:ForestColorAPI:VERSION'
}If you want to use gradient you need to use pattern like {#b36000>}Super gradient!{#72cc00<}
For normal RGB {#72cc00}Super color!
// Example of removing chars, legacy colors, and patternsStringcleanMessage = ColorAPI.clear("{#b36000>}Super gradient{#72cc00<} &3Some color");
// Output -> "Super gradient Some color" message without patterns, colors, chars...// You can use separate methods to clear only some kind of coloring// Example of universal usage for colorizeplayer.sendMessage(ColorAPI.colorize("{#b36000>}Super gradient{#72cc00<} {#b36000}Super RGB color"));
// Example of gradient methodplayer.sendMessage(ColorAPI.colorizeGradient("{#b36000>}Super gradient{#72cc00<}"));
// Example of RGB methodplayer.sendMessage(ColorAPI.colorizeRGB("{#b36000}Super RGB color"));
// Example of classic methodplayer.sendMessage(ColorAPI.colorizeClassic("&3Some color"));
// Example of selecting colorize type <GRADIENT | RGB | CLASSIC>player.sendMessage(ColorAPI.colorizeType(ColorizeType.RGB, "{#b36000}Super RGB color"));ForestRedisAPI is licensed under the permissive MIT license. Please see LICENSE.txt for more information.