Class WRate
java.lang.Object
com.olziedev.playerwarps.api.warp.WRate
Represents warp rating that can provide and manage basic rating data for the warp.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Represents a warp rate entry per player. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract int
abstract double
abstract HashMap<UUID,
WRate.RateEntry> getRates()
abstract String
abstract int
abstract void
setEarnedRateRewards
(List<String> earnedRateRewards) Modifies the list of all the earned rate rewards for this warp.abstract void
setWarpRate
(UUID rater, int rate, String description) This will set the warp rate for that rater.
-
Constructor Details
-
WRate
public WRate()
-
-
Method Details
-
getRateAverage
public abstract double getRateAverage()- Returns:
- The average rates that the warp has.
-
getTotalRates
public abstract int getTotalRates()- Returns:
- The total amount of rates added up that the warp has.
-
getPlayersRatedAmount
public abstract int getPlayersRatedAmount()- Returns:
- The players amount that have rated the warp.
-
setWarpRate
This will set the warp rate for that rater.- Parameters:
rater
- The rater that is rating this warp.rate
- The amount the rater rated.description
- The description of the rate.
-
getRateStars
- Returns:
- The stars depending on the warps rate average.
-
getRates
- Returns:
- The map of the all warp rates for this warp.
-
getEarnedRateRewards
- Returns:
- The list of all the earned rate rewards for this warp.
-
setEarnedRateRewards
Modifies the list of all the earned rate rewards for this warp.- Parameters:
earnedRateRewards
- List of all the earned rate rewards.
-