Class FitnessManager
java.lang.Object
nl.minetopiasdb.api.playerdata.fitness.FitnessManager
Class for managing fitness.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDefaults(UUID uuid) Add default fitness data for given UUIDvoidcheckStatistics(org.bukkit.entity.Player player) Check the fitness statistics of a player, to decide if his/her fitness should increasestatic FitnessManagerGet the instance of FitnessManager.voidhealthPointsCheck(org.bukkit.entity.Player player) Check the health level of a player, to decide if his/her health points should increasebooleanisInDatabase(UUID uuid) Check if user is in fitness databasevoidloadOfflinePlayer(OfflineSDBPlayer player) Get the offline fitness object for a given UUID.voidloadOnlinePlayer(OnlineSDBPlayer player) Get the online fitness object for a given UUID.voidpushSetsToDatabase(UUID uuid, HashMap<String, Integer> changes) Push changes of player to database
-
Constructor Details
-
FitnessManager
public FitnessManager()
-
-
Method Details
-
getInstance
Get the instance of FitnessManager.- Returns:
- instance of FitnessManager.
-
loadOnlinePlayer
Get the online fitness object for a given UUID.- Parameters:
player- online sdb player
-
loadOfflinePlayer
Get the offline fitness object for a given UUID.- Parameters:
player- online sdb player
-
isInDatabase
Check if user is in fitness database- Parameters:
uuid- uuid of player- Returns:
- true if in database
-
addDefaults
Add default fitness data for given UUID- Parameters:
uuid- uuid of player
-
pushSetsToDatabase
Push changes of player to database- Parameters:
uuid- uuid of playerchanges- hashmap (key, value)
-
checkStatistics
public void checkStatistics(org.bukkit.entity.Player player) Check the fitness statistics of a player, to decide if his/her fitness should increase- Parameters:
player- player
-
healthPointsCheck
public void healthPointsCheck(org.bukkit.entity.Player player) Check the health level of a player, to decide if his/her health points should increase- Parameters:
player- player
-