Class PlayerLoader

java.lang.Object
studio.magemonkey.fusion.data.player.PlayerLoader

public class PlayerLoader extends Object
  • Constructor Details

    • PlayerLoader

      public PlayerLoader()
  • Method Details

    • getPlayer

      public static FusionPlayer getPlayer(UUID uuid)
    • getPlayer

      public static FusionPlayer getPlayer(org.bukkit.entity.Player player)
    • getPlayerIfReady

      public static FusionPlayer getPlayerIfReady(UUID uuid)
      Returns the FusionPlayer if it is not currently locked for saving, otherwise returns null. This provides an explicit, safe way for call sites that cannot proceed during a save window.
    • getPlayerIfReady

      public static FusionPlayer getPlayerIfReady(org.bukkit.entity.Player player)
    • getPlayerBlocking

      public static FusionPlayer getPlayerBlocking(UUID uuid, long timeoutMs)
      Blocks (polling) until the player's DB lock is cleared or until timeoutMs is reached. Returns the FusionPlayer if the lock cleared within the timeout, otherwise returns null. Note: Blocking the main server thread is dangerous; call this from an async thread or keep timeout small.
    • getPlayerBlocking

      public static FusionPlayer getPlayerBlocking(org.bukkit.entity.Player player, long timeoutMs)
    • loadPlayer

      public static void loadPlayer(org.bukkit.entity.Player player)
    • unloadPlayer

      public static void unloadPlayer(org.bukkit.entity.Player player)
    • clearCache

      public static void clearCache()