Skip to content

Util

color

Replaces & color codes with the Minecraft color symbol.

java
String colored = util.color(String text);

colorSymbol

Minecraft unicode character for color codes.

java
String colorSymbol = util.colorSymbol;

decodeb64

Decode base 64 encoded text.

java
String decoded = util.decodeb64(String b64);

encodeb64

Encode text into base 64.

java
String encoded = util.encodeb64(String text);

randomDouble

Returns a random double within the inclusive range.

java
double random = util.randomDouble(double min, double max);

randomInt

Returns a random int within the inclusive range.

java
int random = util.randomInt(int min, int max);

round

Rounds a double to the specified number of decimal places.

java
double rounded = util.round(double value, int decimals);

strip

Removes Minecraft color codes from a string.

java
String plain = util.strip(String text);