public class JSONChatBuilder
extends java.lang.Object
To be used with the MessageBuilder MessageBuilder
Constructor and Description |
---|
JSONChatBuilder(java.lang.String displayMessage)
Create a JSON Message
|
JSONChatBuilder(java.lang.String displayMessage,
org.bukkit.entity.Player p)
Create a JSON Message
|
Modifier and Type | Method and Description |
---|---|
net.md_5.bungee.api.chat.BaseComponent[] |
build()
Build the JSONChatMessage
|
JSONChatBuilder |
setClickOpenUrl(java.lang.String url)
Have the JSON open up a url.
|
JSONChatBuilder |
setClickRunCommand(java.lang.String command)
Have the JSON run a command.
|
JSONChatBuilder |
setClickSuggestCommand(java.lang.String command)
Have the JSON suggest a command
|
JSONChatBuilder |
setHoverShowText(java.util.List<java.lang.String> lore)
Add a hove message.
|
public JSONChatBuilder(java.lang.String displayMessage)
displayMessage
- The base string that you would hover or click on.public JSONChatBuilder(java.lang.String displayMessage, org.bukkit.entity.Player p)
displayMessage
- The base string that you would hover or click on.p
- The player to use when doing PlaceHolders.public JSONChatBuilder setHoverShowText(java.util.List<java.lang.String> lore)
lore
- Lorepublic JSONChatBuilder setClickOpenUrl(java.lang.String url)
url
- The urlpublic JSONChatBuilder setClickRunCommand(java.lang.String command)
command
- The command to runpublic JSONChatBuilder setClickSuggestCommand(java.lang.String command)
command
- The commandpublic net.md_5.bungee.api.chat.BaseComponent[] build()