Class TextUtils

java.lang.Object
sawfowl.localeapi.api.TextUtils

public class TextUtils extends Object
  • Constructor Details

    • TextUtils

      public TextUtils()
  • Method Details

    • createCallBack

      public static Component createCallBack(Component component, Runnable runnable)
      Adding the execution of arbitrary code when you click on text.
      It is used createCallBack(Component, Consumer)
    • createCallBack

      public static Component createCallBack(Component component, Consumer<CommandCause> callback)
      Adding the execution of arbitrary code when you click on text.
      It is used SpongeComponents.executeCallback(callback)
    • serializeLegacy

      public static final String serializeLegacy(Component component)
      It is used LegacyComponentSerializer.legacyAmpersand()
    • serializeJson

      public static final String serializeJson(Component component)
      It is used GsonComponentSerializer.gson()
    • deserializeLegacy

      public static final Component deserializeLegacy(String string)
      It is used LegacyComponentSerializer.legacyAmpersand()
    • deserializeJson

      public static final Component deserializeJson(String string)
      It is used GsonComponentSerializer.gson()
    • clearDecorations

      public static final String clearDecorations(Component component)
      Removing all decorations from the text.
    • clearDecorations

      public static final String clearDecorations(String string)
      Removing all decorations from the text.
    • removeDecorations

      public static final Component removeDecorations(Component component)
      Removing all decorations from the text.
    • removeDecorations

      public static final Component removeDecorations(String string)
      Removing all decorations from the text.
    • deserialize

      public static final Component deserialize(String string)
      String to Component conversion.
    • isLegacyDecor

      public static boolean isLegacyDecor(String string)
      Checking the string for decorations.
    • timeFormat

      public static Component timeFormat(long timeSecond, Locale locale, Component day, Component hour, Component minute, Component second)
      Time formatting.