Class FitnessManager
java.lang.Object
nl.minetopiasdb.api.playerdata.fitness.FitnessManager
Class for managing fitness.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDefaults
(UUID uuid) Add default fitness data for given UUIDvoid
checkStatistics
(org.bukkit.entity.Player player) Check the fitness statistics of a player, to decide if his/her fitness should increasestatic FitnessManager
Get the instance of FitnessManager.void
healthPointsCheck
(org.bukkit.entity.Player player) Check the health level of a player, to decide if his/her health points should increaseboolean
isInDatabase
(UUID uuid) Check if user is in fitness databasevoid
loadOfflinePlayer
(OfflineSDBPlayer player) Get the offline fitness object for a given UUID.void
loadOnlinePlayer
(OnlineSDBPlayer player) Get the online fitness object for a given UUID.void
pushSetsToDatabase
(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
-