public class DataHolder extends Object
Constructor and Description |
---|
DataHolder(DataType type,
long desired,
double desiredRangePercent)
Constructs a DataHolder with a DataType and a desired value, including a percentage around the desired value considered acceptable
|
Modifier and Type | Method and Description |
---|---|
String |
getFormattedData(long data)
Returns a String, formatted with Bungee ChatColors.
GREEN if the value is better than desired and outside of acceptable range. YELLOW if the value is better or worse than desired, and within acceptable range. RED if the value is worse than desired and outside of acceptable range. |
public DataHolder(DataType type, long desired, double desiredRangePercent)
type
- The type of data held in this instance.desired
- The desired value. This should be the average value of whatever is being measured.desiredRangePercent
- The percentage around the desired value to be considered acceptable.public String getFormattedData(long data)
data
- The data to format.Copyright © 2020. All rights reserved.