Interface IConfigEntry<T>
public interface IConfigEntry<T>
Use for making the config variables
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addValueChangeListener
(Consumer<T> onValueChangeFunc) boolean
equals
(IConfigEntry<?> obj) Is the value of this equal to anotherget()
boolean
Returns 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 valuebyte
isValid()
Checks if the option is valid 0 == valid 2 == invalid 1 == number too high -1 == number too lowbyte
Checks if a value is validvoid
void
setApiValue
(T newApiValue) void
setComment
(String newComment) Sets the commentvoid
Sets the max valuevoid
Sets the min valuevoid
Sets the min and max in 1 settervoid
setWithoutSaving
(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
-