Package sawfowl.localeapi.api
Class TextUtils
java.lang.Object
sawfowl.localeapi.api.TextUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final StringclearDecorations(String string) Removing all decorations from the text.static final StringclearDecorations(Component component) Removing all decorations from the text.static ComponentcreateCallBack(Component component, Runnable runnable) Adding the execution of arbitrary code when you click on text.
It is usedcreateCallBack(Component, Consumer)static ComponentcreateCallBack(Component component, Consumer<CommandCause> callback) Adding the execution of arbitrary code when you click on text.
It is usedSpongeComponents.executeCallback(callback)static final Componentdeserialize(String string) String toComponentconversion.static final ComponentdeserializeJson(String string) It is usedGsonComponentSerializer.gson()static final ComponentdeserializeLegacy(String string) It is usedLegacyComponentSerializer.legacyAmpersand()static booleanisLegacyDecor(String string) Checking the string for decorations.static final ComponentremoveDecorations(String string) Removing all decorations from the text.static final ComponentremoveDecorations(Component component) Removing all decorations from the text.static final StringserializeJson(Component component) It is usedGsonComponentSerializer.gson()static final StringserializeLegacy(Component component) It is usedLegacyComponentSerializer.legacyAmpersand()static ComponenttimeFormat(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 toComponentconversion. -
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.
-