Class FitnessManager

java.lang.Object
nl.minetopiasdb.api.playerdata.fitness.FitnessManager

public class FitnessManager extends Object
Class for managing fitness.
  • Constructor Details

    • FitnessManager

      public FitnessManager()
  • Method Details

    • getInstance

      public static FitnessManager getInstance()
      Get the instance of FitnessManager.
      Returns:
      instance of FitnessManager.
    • loadOnlinePlayer

      public void loadOnlinePlayer(OnlineSDBPlayer player)
      Get the online fitness object for a given UUID.
      Parameters:
      player - online sdb player
    • loadOfflinePlayer

      public void loadOfflinePlayer(OfflineSDBPlayer player)
      Get the offline fitness object for a given UUID.
      Parameters:
      player - online sdb player
    • isInDatabase

      public boolean isInDatabase(UUID uuid)
      Check if user is in fitness database
      Parameters:
      uuid - uuid of player
      Returns:
      true if in database
    • addDefaults

      public void addDefaults(UUID uuid)
      Add default fitness data for given UUID
      Parameters:
      uuid - uuid of player
    • pushSetsToDatabase

      public void pushSetsToDatabase(UUID uuid, HashMap<String,Integer> changes)
      Push changes of player to database
      Parameters:
      uuid - uuid of player
      changes - 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