Package sawfowl.localeapi.api
Interface Text
- All Superinterfaces:
DataSerializable
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionAppends a component to this text.Appends a text to this text.default <T> TextapplyPlaceholders(Component def, Object... args) default <T> TextapplyPlaceholders(T target, Component def) createCallBack(Runnable runnable) Adding the execution of arbitrary code when you click on text.
It is usedcreateCallBack(Consumer)createCallBack(Consumer<CommandCause> callback) Adding the execution of arbitrary code when you click on text.
It is usedSpongeComponents.executeCallback(callback)get()Exiting from the editor and retrieve theComponentobject.static Textstatic TextRemoving all decorations from the text.This method works similarly toString.replace(String, String)This method works similarly toString.replace(String, String)This method works similarly toString.replace(String, String)This method works similarly toString.replace(String, String)This method works similarly toString.replace(String, String)This method works similarly toString.replace(String, String)This method works similarly toString.replace(String, String)This method works similarly toString.replace(String, String)default Textreplace(Placeholders.DefaultPlaceholderKeys key, Object object) default Textreplace(Placeholders.DefaultPlaceholderKeys key, String value) default Textreplace(Placeholders.DefaultPlaceholderKeys key, Component component) toPlain()Exiting from the editor and getting a string without any decoration or additional functionality.
Appropriate for sending a message to the console.Methods inherited from interface org.spongepowered.api.data.persistence.DataSerializable
contentVersion, toContainer
-
Method Details
-
of
-
of
-
get
Component get()Exiting from the editor and retrieve theComponentobject. -
toPlain
String toPlain()Exiting from the editor and getting a string without any decoration or additional functionality.
Appropriate for sending a message to the console. -
append
Appends a component to this text. -
append
Appends a text to this text. -
replace
This method works similarly toString.replace(String, String) -
replace
This method works similarly toString.replace(String, String) -
replace
This method works similarly toString.replace(String, String) -
replace
This method works similarly toString.replace(String, String) -
replace
This method works similarly toString.replace(String, String) -
replace
This method works similarly toString.replace(String, String) -
replace
This method works similarly toString.replace(String, String) -
replace
This method works similarly toString.replace(String, String) -
createCallBack
Adding the execution of arbitrary code when you click on text.
It is usedcreateCallBack(Consumer) -
createCallBack
Adding the execution of arbitrary code when you click on text.
It is usedSpongeComponents.executeCallback(callback) -
removeDecorations
Text removeDecorations()Removing all decorations from the text. -
replace
-
replace
-
replace
-
applyPlaceholders
-
applyPlaceholders
-