Getting started
Message
To get started first you need to create a BukkitMessage
.
This will be the base of every message you parse.
Message Options
You can also specify some message options to the message creator, this allows you to control how the message will be parsed.
The base of the message options is the MessageOptions
builder:
With it you can remove some formats:
In this example, the BOLD format will be removed and it'll not parse the bold portion of the message.
You can also set a default color to be used in the messages:
Available color types are
FlatColor - Takes in a String with a color, can be hex or just the name, for example:
FlatColor("red");
GradientColor - Takes in a List of
Color
objects.RainbowColor - Takes two values, a saturation level and a brightness level.
Finally you can pass the format options to the message creator:
Parsing
Finally all there is left to do is parsing the message:
The MessageComponent
holds the parsed values that you can use for anything you want.
Last updated