Class APIUtils

java.lang.Object
com.hypherionmc.simplerpc.api.utils.APIUtils

public class APIUtils extends Object
  • Field Details

    • CUR_DIR

      public static String CUR_DIR
  • Constructor Details

    • APIUtils

      public APIUtils()
  • Method Details

    • worldNameToReadable

      public static String worldNameToReadable(String name)
      Helper method to make the world name a bit nicer to read
      Parameters:
      name - The raw world name
      Returns:
      The formatted world name
    • findDimension

      @Internal public static Optional<DimensionSection.Dimension> findDimension(List<DimensionSection.Dimension> list)
      Tries to find a matching Biome/Dimension or both override from the config
      Parameters:
      list - A copy of the loaded Dimension overrides
      Returns:
      The resolved RPC that will be displayed
    • parseAndLimit

      public static String parseAndLimit(String input, int limit)
      Helper method to resolve placeholders, and limit the output string length. This is required for some RPC fields
      Parameters:
      input - The Raw string before formatting
      limit - The length to limit the return string to
      Returns:
      The formatted, and trimmed string