The indispensable chat library
for your plugin
What is the ChatBuilderLib?
The ChatBuilderLib was developed because I was asking me how I get links or hover effects to the chat. So I searched a lot in the internet and found the Chat-Packet of the minecraft packet protocol. I read it and thought: Wow, that's easy! But I decided to go a step further: How could I translate that difficult packet protocol to classes and makes it easy to use for other developers. Very fast I decided to make it like the StringBuilder of java and ...
here we are!
This plugin was tested on 1.7.* and 1.8.* only! Any lower isn't supported currently!
More help, information and "HowTo's" you can find on https://github.com/Yannici/ChatBuilderLib/wiki
This plugin uses plugin metrics. Plugin metrics sends anonymous data to mcstats.org to collect data about your server (player amount, server version etc.). With these data I can create statistics how many players/servers uses my plugin. Plugin metrics can be disabled over the config.yml (the configuration) in plugin data folder.
I think a example should be enough for every developer. All features of this builder they can find in the source or jar
Example code for that is:
You can easily test that example on your server:PHP:
ChatBuilder builder = new ChatBuilder();
builder.appendText(ChatColor.YELLOW + "That is my new ");
ChatElement link = builder.appendText("ChatBuilderLib-Plugin");
link.setHoverEvent(ChatHoverEventAction.SHOW_TEXT, ChatColor.AQUA + "YEAH!");
// no attributes
// one line
builder.appendText("And I love it!")
.setHoverEvent(ChatHoverEventAction.SHOW_TEXT, ChatColor.GREEN + "SO MUCH!");
// send to player
1. Download the plugin
2. Enable plugin on your server by copy & paste the downloaded jar file to the plugins folder.
3. Test the example by executing the command /cbl
Support that project by checking for bugs and creating pull requests or post issues on GitHub
You can support by donation, too! THANK YOU!
That would be nice!
You must have credits which are referencing to me when using the code in your plugin/projects
You are allowed to modify the code when you're doing a pull request on github for that modification
You are allowed to decompile the source
You are not allowed to share the code as yours
Library to easily create modern chat messages with events
- Added Plugin metrics for statistics (configurable) May 7, 2015
- Added support for selectors May 7, 2015
- Added support for "with" at translatable elements May 7, 2015