Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
mickare edited this page Jun 11, 2014 · 8 revisions

Basic ChatBuilder

BukkitChatAPI.newBuilder() creates a new basic ChatBuilder.

.build() returns a ChatMessage with all the components added to the ChatBuilder.

.newLine() adds a new line.

.appendText( String text ) adds the text to the Builder and creates converts automatically all ChatColor elements. .append( String text ) works like .appendText( String text ) but additionally converts all URLs to clickable URLs.

You can open a format section with: .openColor( ChatColor color ) The last opened format section can be closed with .closeColor(), or you can close directly a higher color with .closeColor( ChatColor color ).

That same principle is with HoverEvent and ClickEvents.

Open Click Event: .openClick( IEventClick event ) Close Click Event: .closeClick( IEventClick event ) Close last Click: .closeClick()

Open Hover Event: .openClick( IEventHover event ) Close Hover Event: .closeClick( IEventHover event ) Close last Hover: .closeClick()

BBCode ChatBuilder

BukkitChatAPI.newBBCodeBuilder() creates a ChatBuilder that can parse BBCode.

.appendBBCode( String message ) parses the message as BBCode and appends it to the builder. You can see all possible formats > here <

Clone this wiki locally