Package sawfowl.localeapi.api
Class TextUtils
java.lang.Object
sawfowl.localeapi.api.TextUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final String
clearDecorations
(String string) Removing all decorations from the text.static final String
clearDecorations
(Component component) Removing all decorations from the text.static Component
createCallBack
(Component component, Runnable runnable) Adding the execution of arbitrary code when you click on text.
It is usedcreateCallBack(Component, Consumer)
static Component
createCallBack
(Component component, Consumer<CommandCause> callback) Adding the execution of arbitrary code when you click on text.
It is usedSpongeComponents.executeCallback(callback)
static final Component
deserialize
(String string) String toComponent
conversion.static final Component
deserializeJson
(String string) It is usedGsonComponentSerializer.gson()
static final Component
deserializeLegacy
(String string) It is usedLegacyComponentSerializer.legacyAmpersand()
static boolean
isLegacyDecor
(String string) Checking the string for decorations.static final Component
removeDecorations
(String string) Removing all decorations from the text.static final Component
removeDecorations
(Component component) Removing all decorations from the text.static final String
serializeJson
(Component component) It is usedGsonComponentSerializer.gson()
static final String
serializeLegacy
(Component component) It is usedLegacyComponentSerializer.legacyAmpersand()
static Component
timeFormat
(long timeSecond, Locale locale, Component day, Component hour, Component minute, Component second) Time formatting.
-
Constructor Details
-
TextUtils
public TextUtils()
-
-
Method Details
-
createCallBack
Adding the execution of arbitrary code when you click on text.
It is usedcreateCallBack(Component, Consumer)
-
createCallBack
Adding the execution of arbitrary code when you click on text.
It is usedSpongeComponents.executeCallback(callback)
-
serializeLegacy
It is usedLegacyComponentSerializer.legacyAmpersand()
-
serializeJson
It is usedGsonComponentSerializer.gson()
-
deserializeLegacy
It is usedLegacyComponentSerializer.legacyAmpersand()
-
deserializeJson
It is usedGsonComponentSerializer.gson()
-
clearDecorations
Removing all decorations from the text. -
clearDecorations
Removing all decorations from the text. -
removeDecorations
Removing all decorations from the text. -
removeDecorations
Removing all decorations from the text. -
deserialize
String toComponent
conversion. -
isLegacyDecor
Checking the string for decorations. -
timeFormat
public static Component timeFormat(long timeSecond, Locale locale, Component day, Component hour, Component minute, Component second) Time formatting.
-