Package com.nickuc.chat.api.util
Interface MessagePiece
public interface MessagePiece
This interface is used to reference the "message pieces" implemented by nChat.
-
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a clone of the instance of this message piece.Gets theComponentof this message piece.editComponent(Component component) Edits theComponentof this message piece.Modifies theComponentcontent of this message piece.key()Gets the key of this message piece.
-
Method Details
-
key
String key()Gets the key of this message piece.- Returns:
- the key of this piece of the message without {}
-
component
Component component()Gets theComponentof this message piece. -
editComponent
Edits theComponentof this message piece.- Parameters:
component- the new component to be used- Returns:
- the instance of this message piece
-
editText
Modifies theComponentcontent of this message piece.- Parameters:
content- the new content to be used- Returns:
- the instance of this message piece
-
clone
MessagePiece clone()Creates a clone of the instance of this message piece.- Returns:
- another instance of this message piece
-