Class OnlineFitness
java.lang.Object
nl.minetopiasdb.api.playerdata.fitness.objects.OnlineFitness
- All Implemented Interfaces:
Fitness
Fitness object for online players
-
Constructor Summary
ConstructorDescriptionOnlineFitness
(UUID uuid, int total, int drinkingPoints, int fitGainedByDrinking, int fitGainedByWalking, int fitGainedBySprinting, int fitGainedByClimbing, int fitGainedByFlying, int fitGainedBySwimming, int healthPoints, int fitGainedByHealth, int healthyFood, int unhealthyFood, int fitGainedByFood) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clear all changes that haven't been sent to the database yet.Get a list of changes that have not yet been pushed to the databaseint
Get the amount of drinking points this player hasint
Get the amount of total fitness gained by climbingint
Get the amount of total fitness gained by drinkingint
Get the amount of total fitness gained by flyingint
Get the amount of total fitness gained by eatingint
Get the amount of total fitness gained by health points.int
Get the amount of total fitness gained by sprintingint
Get the amount of total fitness gained by swimmingint
Get the amount of total fitness gained by walkingint
Get the amount of health points this player hasint
Get the amount of healthy food points this player hasint
Get the total fitness (fitness as displayed in scoreboard) for this playerint
Get the amount of unhealthy food points this player hasvoid
setDrinkingPoints
(int drinkingPoints) Set the amount of drinking points this player has.void
setDrinkingPointsSilent
(int drinkingPoints) Set the amount of drinking points this player has without communicating it through message channels.void
setFitGainedByClimbing
(int fitGainedByClimbing) Set the amount of fitness gained by climbingvoid
setFitGainedByClimbingSilent
(int fitGainedByClimbing) Set the amount of fitness gained by climbing without communicating it through message channels.void
setFitGainedByDrinking
(int fitGainedByDrinking) Set the amount of fitness gained by drinkingvoid
setFitGainedByDrinkingSilent
(int fitGainedByDrinking) Set the amount of fitness gained by drinking without communicating it through message channels.void
setFitGainedByFlying
(int fitGainedByFlying) Set the amount of fitness gained by flyingvoid
setFitGainedByFlyingSilent
(int fitGainedByFlying) Set the amount of fitness gained by flying without communicating it through message channels.void
setFitGainedByFood
(int fitGainedByFood) Set the amount of fitness gained by eatingvoid
setFitGainedByFoodSilent
(int fitGainedByFood) Set the amount of fitness gained by eating without communicating it through message channels.void
setFitGainedByHealth
(int fitGainedByHealth) Set the amount of fitness gained by health pointsvoid
setFitGainedByHealthSilent
(int fitGainedByHealth) Set the amount of fitness gained by health points without communicating it through message channels.void
setFitGainedBySprinting
(int fitGainedBySprinting) Set the amount of fitness gained by sprintingvoid
setFitGainedBySprintingSilent
(int fitGainedBySprinting) Set the amount of fitness gained by sprinting without communicating it through message channels.void
setFitGainedBySwimming
(int fitGainedBySwimming) Set the amount of fitness gained by swimmingvoid
setFitGainedBySwimmingSilent
(int fitGainedBySwimming) Set the amount of fitness gained by swimming without communicating it through message channels.void
setFitGainedByWalking
(int fitGainedByWalking) Set the amount of fitness gained by walkingvoid
setFitGainedByWalkingSilent
(int fitGainedByWalking) Set the amount of fitness gained by walking without communicating it through message channels.void
setHealthPoints
(int healthPoints) Set the amount of health points this player has.void
setHealthPointsSilent
(int healthPoints) Set the amount of health points this player has without communicating it through message channels.void
setHealthyFoodPoints
(int healthyFood) Set the amount of healthy food points this player has.void
setHealthyFoodPointsSilent
(int healthyFood) Set the amount of healthy food points this player has without communicating it through message channels.void
setTotalFitness
(int total) Set the total fitness for this playervoid
setTotalFitnessSilent
(int total) Set the total fitness for this player without communicating it through message channels.void
setUnhealthyFoodPoints
(int unhealthyFood) Set the amount of unhealthy food points this player has.void
setUnhealthyFoodPointsSilent
(int unhealthyFood) Set the amount of unhealthy food points this player has without communicating it through message channels.
-
Constructor Details
-
OnlineFitness
public OnlineFitness(UUID uuid, int total, int drinkingPoints, int fitGainedByDrinking, int fitGainedByWalking, int fitGainedBySprinting, int fitGainedByClimbing, int fitGainedByFlying, int fitGainedBySwimming, int healthPoints, int fitGainedByHealth, int healthyFood, int unhealthyFood, int fitGainedByFood)
-
-
Method Details
-
getTotalFitness
public int getTotalFitness()Get the total fitness (fitness as displayed in scoreboard) for this player- Specified by:
getTotalFitness
in interfaceFitness
- Returns:
- total fitness
-
setTotalFitness
public void setTotalFitness(int total) Set the total fitness for this player- Specified by:
setTotalFitness
in interfaceFitness
- Parameters:
total
- new total fitness
-
getDrinkingPoints
public int getDrinkingPoints()Get the amount of drinking points this player has- Specified by:
getDrinkingPoints
in interfaceFitness
- Returns:
- drinking points
-
setDrinkingPoints
public void setDrinkingPoints(int drinkingPoints) Set the amount of drinking points this player has. Once a player has 1000 drinking points, he will gain one fitness point.- Specified by:
setDrinkingPoints
in interfaceFitness
- Parameters:
drinkingPoints
- drinking points
-
getFitGainedByDrinking
public int getFitGainedByDrinking()Get the amount of total fitness gained by drinking- Specified by:
getFitGainedByDrinking
in interfaceFitness
- Returns:
- fitness gained by drinking
-
setFitGainedByDrinking
public void setFitGainedByDrinking(int fitGainedByDrinking) Set the amount of fitness gained by drinking- Specified by:
setFitGainedByDrinking
in interfaceFitness
- Parameters:
fitGainedByDrinking
- fitness gained by drinking
-
getFitGainedByWalking
public int getFitGainedByWalking()Get the amount of total fitness gained by walking- Specified by:
getFitGainedByWalking
in interfaceFitness
- Returns:
- fitness gained by walking
-
setFitGainedByWalking
public void setFitGainedByWalking(int fitGainedByWalking) Set the amount of fitness gained by walking- Specified by:
setFitGainedByWalking
in interfaceFitness
- Parameters:
fitGainedByWalking
- fitness gained by walking
-
getFitGainedBySprinting
public int getFitGainedBySprinting()Get the amount of total fitness gained by sprinting- Specified by:
getFitGainedBySprinting
in interfaceFitness
- Returns:
- fitness gained by sprinting
-
setFitGainedBySprinting
public void setFitGainedBySprinting(int fitGainedBySprinting) Set the amount of fitness gained by sprinting- Specified by:
setFitGainedBySprinting
in interfaceFitness
- Parameters:
fitGainedBySprinting
- fitness gained by sprinting
-
getFitGainedByClimbing
public int getFitGainedByClimbing()Get the amount of total fitness gained by climbing- Specified by:
getFitGainedByClimbing
in interfaceFitness
- Returns:
- fitness gained by climbing
-
setFitGainedByClimbing
public void setFitGainedByClimbing(int fitGainedByClimbing) Set the amount of fitness gained by climbing- Specified by:
setFitGainedByClimbing
in interfaceFitness
- Parameters:
fitGainedByClimbing
- fitness gained by climbing
-
getFitGainedBySwimming
public int getFitGainedBySwimming()Get the amount of total fitness gained by swimming- Specified by:
getFitGainedBySwimming
in interfaceFitness
- Returns:
- fitness gained by swimming
-
setFitGainedBySwimming
public void setFitGainedBySwimming(int fitGainedBySwimming) Set the amount of fitness gained by swimming- Specified by:
setFitGainedBySwimming
in interfaceFitness
- Parameters:
fitGainedBySwimming
- fitness gained by swimming
-
getFitGainedByFlying
public int getFitGainedByFlying()Get the amount of total fitness gained by flying- Specified by:
getFitGainedByFlying
in interfaceFitness
- Returns:
- fitness gained by flying
-
setFitGainedByFlying
public void setFitGainedByFlying(int fitGainedByFlying) Set the amount of fitness gained by flying- Specified by:
setFitGainedByFlying
in interfaceFitness
- Parameters:
fitGainedByFlying
- fitness gained by flying
-
getHealthPoints
public int getHealthPoints()Get the amount of health points this player has- Specified by:
getHealthPoints
in interfaceFitness
- Returns:
- health points
-
setHealthPoints
public void setHealthPoints(int healthPoints) Set the amount of health points this player has.- Specified by:
setHealthPoints
in interfaceFitness
- Parameters:
healthPoints
- health points
-
getFitGainedByHealth
public int getFitGainedByHealth()Get the amount of total fitness gained by health points. You can get health points by having at least 9/10 hearts. You can lose them by having less than 5.- Specified by:
getFitGainedByHealth
in interfaceFitness
- Returns:
- fitness gained by health points
-
setFitGainedByHealth
public void setFitGainedByHealth(int fitGainedByHealth) Set the amount of fitness gained by health points- Specified by:
setFitGainedByHealth
in interfaceFitness
- Parameters:
fitGainedByHealth
- fitness gained by health points
-
getHealthyFoodPoints
public int getHealthyFoodPoints()Get the amount of healthy food points this player has- Specified by:
getHealthyFoodPoints
in interfaceFitness
- Returns:
- healthy food points
-
setHealthyFoodPoints
public void setHealthyFoodPoints(int healthyFood) Set the amount of healthy food points this player has.- Specified by:
setHealthyFoodPoints
in interfaceFitness
- Parameters:
healthyFood
- healthy food points
-
getUnhealthyFoodPoints
public int getUnhealthyFoodPoints()Get the amount of unhealthy food points this player has- Specified by:
getUnhealthyFoodPoints
in interfaceFitness
- Returns:
- unhealthy food points
-
setUnhealthyFoodPoints
public void setUnhealthyFoodPoints(int unhealthyFood) Set the amount of unhealthy food points this player has.- Specified by:
setUnhealthyFoodPoints
in interfaceFitness
- Parameters:
unhealthyFood
- unhealthy food points
-
getFitGainedByFood
public int getFitGainedByFood()Get the amount of total fitness gained by eating- Specified by:
getFitGainedByFood
in interfaceFitness
- Returns:
- fitness gained by eating
-
setFitGainedByFood
public void setFitGainedByFood(int fitGainedByFood) Set the amount of fitness gained by eating- Specified by:
setFitGainedByFood
in interfaceFitness
- Parameters:
fitGainedByFood
- fitness gained by health eating
-
setTotalFitnessSilent
public void setTotalFitnessSilent(int total) Set the total fitness for this player without communicating it through message channels. Please useFitness.setTotalFitness(int)
instead.- Specified by:
setTotalFitnessSilent
in interfaceFitness
- Parameters:
total
- new total fitness
-
setDrinkingPointsSilent
public void setDrinkingPointsSilent(int drinkingPoints) Set the amount of drinking points this player has without communicating it through message channels. Please useFitness.setDrinkingPoints(int)
instead.- Specified by:
setDrinkingPointsSilent
in interfaceFitness
- Parameters:
drinkingPoints
- drinking points
-
setFitGainedByDrinkingSilent
public void setFitGainedByDrinkingSilent(int fitGainedByDrinking) Set the amount of fitness gained by drinking without communicating it through message channels. Please useFitness.setFitGainedByDrinking(int)
instead.- Specified by:
setFitGainedByDrinkingSilent
in interfaceFitness
- Parameters:
fitGainedByDrinking
- fitness gained by drinking
-
setFitGainedByWalkingSilent
public void setFitGainedByWalkingSilent(int fitGainedByWalking) Set the amount of fitness gained by walking without communicating it through message channels. Please useFitness.setFitGainedByWalking(int)
instead.- Specified by:
setFitGainedByWalkingSilent
in interfaceFitness
- Parameters:
fitGainedByWalking
- fitness gained by walking
-
setFitGainedBySprintingSilent
public void setFitGainedBySprintingSilent(int fitGainedBySprinting) Set the amount of fitness gained by sprinting without communicating it through message channels. Please useFitness.setFitGainedBySprinting(int)
instead.- Specified by:
setFitGainedBySprintingSilent
in interfaceFitness
- Parameters:
fitGainedBySprinting
- fitness gained by sprinting
-
setFitGainedByClimbingSilent
public void setFitGainedByClimbingSilent(int fitGainedByClimbing) Set the amount of fitness gained by climbing without communicating it through message channels. Please useFitness.setFitGainedByClimbing(int)
instead.- Specified by:
setFitGainedByClimbingSilent
in interfaceFitness
- Parameters:
fitGainedByClimbing
- fitness gained by climbing
-
setFitGainedBySwimmingSilent
public void setFitGainedBySwimmingSilent(int fitGainedBySwimming) Set the amount of fitness gained by swimming without communicating it through message channels. Please useFitness.setFitGainedBySwimming(int)
instead.- Specified by:
setFitGainedBySwimmingSilent
in interfaceFitness
- Parameters:
fitGainedBySwimming
- fitness gained by swimming
-
setFitGainedByFlyingSilent
public void setFitGainedByFlyingSilent(int fitGainedByFlying) Set the amount of fitness gained by flying without communicating it through message channels. Please useFitness.setFitGainedByFlying(int)
instead.- Specified by:
setFitGainedByFlyingSilent
in interfaceFitness
- Parameters:
fitGainedByFlying
- fitness gained by flying
-
setHealthPointsSilent
public void setHealthPointsSilent(int healthPoints) Set the amount of health points this player has without communicating it through message channels. Please useFitness.setHealthPoints(int)
instead.- Specified by:
setHealthPointsSilent
in interfaceFitness
- Parameters:
healthPoints
- health points
-
setFitGainedByHealthSilent
public void setFitGainedByHealthSilent(int fitGainedByHealth) Set the amount of fitness gained by health points without communicating it through message channels. Please useFitness.setFitGainedByHealth(int)
instead.- Specified by:
setFitGainedByHealthSilent
in interfaceFitness
- Parameters:
fitGainedByHealth
- fitness gained by health points
-
setHealthyFoodPointsSilent
public void setHealthyFoodPointsSilent(int healthyFood) Set the amount of healthy food points this player has without communicating it through message channels. Please useFitness.setHealthyFoodPoints(int)
- Specified by:
setHealthyFoodPointsSilent
in interfaceFitness
- Parameters:
healthyFood
- healthy food points
-
setUnhealthyFoodPointsSilent
public void setUnhealthyFoodPointsSilent(int unhealthyFood) Set the amount of unhealthy food points this player has without communicating it through message channels. Please useFitness.setUnhealthyFoodPoints(int)
- Specified by:
setUnhealthyFoodPointsSilent
in interfaceFitness
- Parameters:
unhealthyFood
- unhealthy food points
-
setFitGainedByFoodSilent
public void setFitGainedByFoodSilent(int fitGainedByFood) Set the amount of fitness gained by eating without communicating it through message channels. Please useFitness.setFitGainedByHealth(int)
- Specified by:
setFitGainedByFoodSilent
in interfaceFitness
- Parameters:
fitGainedByFood
- fitness gained by health eating
-
getChanges
Get a list of changes that have not yet been pushed to the database- Returns:
- hashmap in format column;value
-
clearChanges
public void clearChanges()Clear all changes that haven't been sent to the database yet.
-