Controllers
In-depth review of each built-in Controller types.
There are many different built-in controllers to get you set up quickly.
A toggleable controller that displays a different
Text
based on the state of the option..controller(BooleanController::new)
valueFormatter
parameter is a function to returnText
based on the state of the option. (optional)coloured
parameter is a boolean that colours the returned text red or green based on the state. (optional)
To pass extra parameters, you need to construct a
BooleanController
like so..controller(opt -> new BooleanController(opt, valueFormatter, coloured))


Replace
<Number>
with either Double
, Float
, Integer
and Long
.Slider controllers take a minimum, a maximum and an interval for the slider in their respected number types.
.controller(opt -> new <Number>SliderController(opt, min, max, interval))
Sliders can also take a
valueFormatter
to return a Text
based on the slider value..controller(opt -> new <Number>SliderController(opt, min, max, interval, valueFormatter))








Last modified 2mo ago