Class Utils

java.lang.Object
org.geysermc.floodgate.core.util.Utils

public class Utils extends Object
  • Constructor Details

    • Utils

      public Utils()
  • Method Details

    • readProperties

      public static Properties readProperties(String resourceFile)
      Reads a properties resource file
      Parameters:
      resourceFile - the resource file to read
      Returns:
      the properties file if the resource exists, otherwise null
      Throws:
      AssertionError - if something went wrong while readin the resource file
    • getLocale

      public static String getLocale(Locale locale)
    • isFloodgateUniqueId

      public static boolean isFloodgateUniqueId(UUID uuid)
    • toFloodgateUniqueId

      public static UUID toFloodgateUniqueId(long xuid)
    • toFloodgateUniqueId

      public static UUID toFloodgateUniqueId(String xuid)
    • fromShortUniqueId

      public static UUID fromShortUniqueId(String uuid)
    • isUniquePrefix

      public static boolean isUniquePrefix(String prefix)
    • generateCode

      public static String generateCode(int length)
    • generateCodeChar

      public static char generateCodeChar()
    • getStackTrace

      public static String getStackTrace(Throwable throwable)