ChatBuilderLib 1.0.3

Library to easily create modern chat messages with events

  1. Yannici
    ChatBuilderLib
    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!

    Information

    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


    Plugin-Metrics

    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.

    Example

    I think a example should be enough for every developer. All features of this builder they can find in the source or jar ;)

    [​IMG]
    [​IMG]

    Example code for that is:

    PHP:

    ChatBuilder builder = new ChatBuilder();
    builder.appendText(ChatColor.YELLOW + "That is my new ");

    ChatElement link = builder.appendText("ChatBuilderLib-Plugin");
    link.setClickEvent(ChatClickEventAction.OPEN_URL, "https://github.com/Yannici/ChatBuilderLib");
    link.setBold(true);
    link.setColor("green");
    link.setHoverEvent(ChatHoverEventAction.SHOW_TEXT, ChatColor.AQUA + "YEAH!");
    link.setUnderlined(true);

    // no attributes
    builder.appendText("! ");

    // one line
    builder.appendText("And I love it!")
    .setColor(ChatColor.RED)
    .setItalic(true)
    .setHoverEvent(ChatHoverEventAction.SHOW_TEXT, ChatColor.GREEN + "SO MUCH!");

    // send to player
    builder.sendToPlayer(player);
     
    You can easily test that example on your server:
    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

    Support that project by checking for bugs and creating pull requests or post issues on GitHub :)

    You can support by donation, too! THANK YOU!
    [​IMG]


    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
    Anonyluke and Abeoji like this.

Recent Reviews

  1. KudaDev
    KudaDev
    5/5,
    Version: 1.0.3
  2. Anonyluke
    Anonyluke
    5/5,
    Version: 1.0.3
    Nice! Genau das wonach ich gesucht habe! :o
  3. helptiger
    helptiger
    5/5,
    Version: 1.0.3
    Yannici, great work! Now it's much easier for me to implement interaction into chat elements! Many thanks!
    1. Yannici
      Author's Response
      You're welcome, mate!
  4. victor2748
    victor2748
    5/5,
    Version: 1.0.0
    Pro plugin! Thanks 4 making it
    1. Yannici
      Author's Response
      You're welcome! Thanks.