ChatBuilderLib

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

Example

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

Example chat

Example link

Example code for this is:

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

Plugin-Metrics

This plugin uses plugin metrics of Hidendra. Plugin metrics sends anonymous data to mcstats.org to collect data about your server 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. Following details will be sent:

  • A unique identifier
  • The server's version of Java
  • Whether the server is in offline or online mode
  • The plugin's version
  • The server's version
  • The OS version/name and architecture
  • The core count for the CPU
  • The number of players online
  • The Metrics version

Plugin Metrics

Support

Support that project by checking for bugs and creating pull requests or post issues on GitHub :) That would be nice!

This is under MIT License! Means: The MIT License is a permissive license that is short and to the point. It lets people do anything they want with my code as long as they provide attribution back to me and don’t hold me liable.


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    91736
  • Created
    May 7, 2015
  • Last Released File
    May 7, 2015
  • Total Downloads
    353
  • License

Categories

Members

Recent Files