MinMaxSetting
A setting that has 2 values, can be used for randomness
Last updated
A setting that has 2 values, can be used for randomness
Last updated
new MinMaxSetting(String name, String description, double valueMin, double valueMax, min, max)
Create a new MinMaxSetting
. Please check for how to properly do this.
setValue(double min, double max): void
Sets the value of the setting.
getMinValue(): double
Returns the current min value of the setting.
getMaxValue(): double
Returns the current max value of the setting.
getRandom(): double
Returns a random value from within the current min and max values.
getName(): String
Gives the name of the setting.
getDescription(): String
Returns the description of the setting.
getMin(): double
Returns the minimum value the setting can have, this is given as min
when creating the setting.
getMax(): double
Returns the maximum value the setting can have, this is given as max
when creating the setting.
Do not confuse the min
and max
with the actual values of the setting.
setHidden(boolean hidden): void
Allows you to hide a setting from the menu.
setHidden()
only works on settings that have been initiated by scripts in the first place!
isHidden(boolean hidden): void
Allows you to hide a setting from the menu.