Package studio.magemonkey.fusion.api
Class PlayerManager
java.lang.Object
studio.magemonkey.fusion.api.PlayerManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClear the cache of all players.Get the FusionPlayer object of a player by his name.Get the FusionPlayer object of a player by his UUID.getPlayer(org.bukkit.entity.Player player) Get the FusionPlayer object of a player by his UUID.voidSave the player data of a player.voidsavePlayer(org.bukkit.entity.Player player) Save the player data of a player.
-
Constructor Details
-
PlayerManager
public PlayerManager()
-
-
Method Details
-
getPlayer
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
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
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.
-