Class PlayerManager

java.lang.Object
studio.magemonkey.fusion.api.PlayerManager

public class PlayerManager extends Object
  • Constructor Details

    • PlayerManager

      public PlayerManager()
  • Method Details

    • getPlayer

      public FusionPlayer getPlayer(String playerName)
      Get the FusionPlayer object of a player by his name.
      Parameters:
      playerName - The name of the player.
      Returns:
      The FusionPlayer object of the player.
    • getPlayer

      public FusionPlayer getPlayer(org.bukkit.entity.Player player)
      Get the FusionPlayer object of a player by his UUID.
      Parameters:
      player - The Player object of the player.
      Returns:
      The FusionPlayer object of the player.
    • getPlayer

      public FusionPlayer getPlayer(UUID uuid)
      Get the FusionPlayer object of a player by his UUID.
      Parameters:
      uuid - The UUID of the player.
      Returns:
      The FusionPlayer object of the player.
    • savePlayer

      public void savePlayer(org.bukkit.entity.Player player)
      Save the player data of a player. This will save the player data to the database.
      Parameters:
      player - The Player object of the player.
    • saveAllPlayers

      public void saveAllPlayers()
      Save the player data of a player. This will save all players to the database and reload them.
    • clearAllPlayers

      public void clearAllPlayers()
      Clear the cache of all players. This will save all players to the database and clear the cache. They wont be reloaded until they are accessed again.