Package redempt.redlib.misc
Class UserCache
java.lang.Object
redempt.redlib.misc.UserCache
A cache of offline users by name which can be queried without worrying about web requests
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidInitializes the user cache asynchronouslystatic voidInitializes the user cache asynchronouslystatic org.bukkit.OfflinePlayergetOfflinePlayer(String name) Gets an OfflinePlayer by namestatic voidinit()Initializes the user cache synchronously
-
Constructor Details
-
UserCache
public UserCache()
-
-
Method Details
-
asyncInit
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
Gets an OfflinePlayer by name- Parameters:
name- The name of the player, case insensitive- Returns:
- The OfflinePlayer, or null
-