@NotThreadSafe public final class Message extends Object
Constructor and Description |
---|
Message()
Starts building a new chat message
|
Modifier and Type | Method and Description |
---|---|
String |
asJson()
The underlying JSON formatted string of the message
|
Message |
clickEvent(ClickEvent event)
Adds an action when the message is clicked
|
Message |
color(ChatColor color)
Adds color to the message
|
Message |
hoverEvent(HoverEvent event)
Adds an action when the message is hovered by the mouse
|
com.google.gson.JsonObject |
message()
The object representation of the JSON
|
Message |
text(String input)
The text to display to the messageable
|
public Message()
public Message text(String input)
input
- the textpublic Message color(ChatColor color)
color
- the color to addpublic Message clickEvent(ClickEvent event)
event
- the clickevent to usepublic Message hoverEvent(HoverEvent event)
event
- the hoverevent to usepublic String asJson()
public com.google.gson.JsonObject message()
Copyright © 2016. All rights reserved.