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.

Methods

.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.

.openColor( ChatColor color ) - opens a format section with the color.

.closeColor() - closes the last opened format section.

.closeColor( ChatColor color ) - closes the opened format section with the given color.

Click Event

Just create a Click Event Object: IEventClick event = new ClickEvent(ActionClick action, String value);

And then just open the Event Section:

Open Click Event: .openClick( IEventClick event )

Close Click Event: .closeClick( IEventClick event )

Close last Click: .closeClick()

Hover Event

Again create an Event Object: IEventClick event = new ClickEvent(ActionClick action, String value);

And then open the Event Section:

Open Hover Event: .openHover( IEventHover event )

Close Hover Event: .closeHover( IEventHover event )

Close last Hover: .closeHover()

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