Interface IConfigEntry<T>
public interface IConfigEntry<T>
Use for making the config variables
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddValueChangeListener(Consumer<T> onValueChangeFunc) booleanequals(IConfigEntry<?> obj) Is the value of this equal to anotherget()booleanReturns true if this config can be set via the API.Gets the commentGets the default value of the optiongetMax()Gets the max valuegetMin()Gets the min valuebyteisValid()Checks if the option is valid 0 == valid 2 == invalid 1 == number too high -1 == number too lowbyteChecks if a value is validvoidvoidsetApiValue(T newApiValue) voidsetComment(String newComment) Sets the commentvoidSets the max valuevoidSets the min valuevoidSets the min and max in 1 settervoidsetWithoutSaving(T newValue) Sets the value without saving
-
Method Details
-
getDefaultValue
T getDefaultValue()Gets the default value of the option -
setApiValue
-
getApiValue
T getApiValue() -
getAllowApiOverride
boolean getAllowApiOverride()Returns true if this config can be set via the API. -
set
-
get
T get() -
getTrueValue
T getTrueValue() -
setWithoutSaving
Sets the value without saving -
getMin
T getMin()Gets the min value -
setMin
Sets the min value -
getMax
T getMax()Gets the max value -
setMax
Sets the max value -
setMinMax
Sets the min and max in 1 setter -
getComment
String getComment()Gets the comment -
setComment
Sets the comment -
isValid
byte isValid()Checks if the option is valid 0 == valid 2 == invalid 1 == number too high -1 == number too low -
isValid
Checks if a value is valid -
equals
Is the value of this equal to another -
addValueChangeListener
-