Interface WConfig


public interface WConfig
Represents the config API for PlayerWarps.
  • Field Details

  • Method Details

    • getInstance

      static void getInstance(Consumer<WConfig> api)
      Waits for the instance of the API when it is ready.
      Parameters:
      api - Callback with the instance of the API.
    • addConfigBlacklist

      void addConfigBlacklist(String file, List<String> paths)
      Add blacklist paths and sections for the config file.
      Parameters:
      file - The file to blacklist the paths.
      paths - The list of the blacklist paths.
    • formatNumber

      default String formatNumber(double number)
      Parameters:
      number - The number to format.
      Returns:
      The formatted number.
    • formatNumber

      String formatNumber(double number, boolean shortFormat)
      Parameters:
      number - The number to format.
      shortFormat - If the number should be formatted in a short format, in the config short formatting needs to be enabled as well.
      Returns:
      The formatted number.
    • formatNumberShort

      String formatNumberShort(double number)
      Parameters:
      number - The number to short format.
      Returns:
      The formatted number.
    • getLanguageValue

      String getLanguageValue(String key)
      Parameters:
      key - The key from the language file.
      Returns:
      The language value based on the default language.
    • getLanguageValue

      String getLanguageValue(UUID uuid, String key)
      Parameters:
      key - The key from the language file.
      uuid - The uuid of the player to get the language type.
      Returns:
      The language value.