Class UserCache

java.lang.Object
redempt.redlib.misc.UserCache

public class UserCache extends Object
A cache of offline users by name which can be queried without worrying about web requests
  • Constructor Details

    • UserCache

      public UserCache()
  • Method Details

    • asyncInit

      public static void asyncInit(Runnable onComplete)
      Initializes the user cache asynchronously
      Parameters:
      onComplete - A Runnable to be run when the initialization is complete
    • asyncInit

      public static void asyncInit()
      Initializes the user cache asynchronously
    • init

      public static void init()
      Initializes the user cache synchronously
    • getOfflinePlayer

      public static org.bukkit.OfflinePlayer getOfflinePlayer(String name)
      Gets an OfflinePlayer by name, initializing the cache synchronously if it has not been initialized yet
      Parameters:
      name - The name of the player, case insensitive
      Returns:
      The OfflinePlayer, or null