public class WrappedChatComponent extends AbstractWrapper
handle, handleType| Modifier and Type | Method and Description |
|---|---|
WrappedChatComponent |
deepClone()
Retrieve a deep copy of the current chat component.
|
static WrappedChatComponent[] |
fromChatMessage(String message)
Construct an array of chat components from a standard Minecraft message.
|
static WrappedChatComponent |
fromHandle(Object handle)
Construct a new chat component wrapper around the given NMS object.
|
static WrappedChatComponent |
fromJson(String json)
Construct a new chat component wrapper from the given JSON string.
|
static WrappedChatComponent |
fromText(String text)
Construct a wrapper around a new text chat component with the given text.
|
String |
getJson()
Retrieve a copy of this component as a JSON string.
|
void |
setJson(String obj)
Set the content of this component using a JSON object.
|
String |
toString() |
equals, getHandle, getHandleType, hashCode, setHandlepublic static WrappedChatComponent fromHandle(Object handle)
handle - - the NMS object.public static WrappedChatComponent fromJson(String json)
json - - the json.public static WrappedChatComponent fromText(String text)
text - - the text of the text chat component.public static WrappedChatComponent[] fromChatMessage(String message)
This uses ChatColor for formating.
message - - the message.public String getJson()
Note that any modifications to this JSON string will not update the current component.
public void setJson(String obj)
obj - - the JSON that represents the new component.public WrappedChatComponent deepClone()
public String toString()
toString in class AbstractWrapperCopyright © 2012–2017 Comphenix and dmulloy2. Licensed under the GNU GPL v2.