Class FitnessBoostManager

java.lang.Object
nl.minetopiasdb.api.playerdata.fitness.boost.FitnessBoostManager

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

    • FitnessBoostManager

      public FitnessBoostManager()
  • Method Details

    • getInstance

      public static FitnessBoostManager getInstance()
      Get the instance of FitnessBoostManager.
      Returns:
      instance of FitnessBoostManager.
    • getFitnessBoosts

      public List<FitnessBoost> getFitnessBoosts(boolean expired)
      Get all (expired) fitnessboosts
      Parameters:
      expired - true if only expired fitnessboosts need to be returned
      Returns:
      list of (expired) fitness boosts
    • createBoost

      public void createBoost(UUID uuid, int fitness, int minutes)
      Create a fitness boost
      Parameters:
      uuid - uuid of onling player. Offline players are currently not supported
      fitness - amount of fitness that should be added (or removed if fitness less than 0)
      minutes - amount of minutes that this booster should run for
    • manageTask

      public void manageTask()
      Run the fitnessboost task once.