Package net.storm.api.plugins.config
Annotation Interface Range
Annotation that specifies the valid numeric range for a configuration item.
When applied to a ConfigItem method that returns a numeric type
(int, long, double, etc.), the configuration UI will enforce the specified
minimum and maximum values. This may also affect UI presentation, such as
displaying a slider instead of a text field.
Example usage:
@ConfigItem(
keyName = "tickDelay",
name = "Tick Delay",
description = "Number of ticks to wait"
)
@Range(min = 1, max = 10)
default int tickDelay() {
return 3;
}
- See Also:
-
Optional Element Summary
Optional Elements
-
Element Details
-
min
int minThe minimum allowed value (inclusive).- Returns:
- the minimum value, defaults to 0
- Default:
0
-
max
int maxThe maximum allowed value (inclusive).- Returns:
- the maximum value, defaults to
Integer.MAX_VALUE
- Default:
2147483647
-