Option
com.jsmacrosce.jsmacros.core.config.Option
Configures how an annotated configuration field or method is presented in the settings editor.
js
const Config = Java.type("com.jsmacrosce.jsmacros.core.config.CoreConfigV2");
const Option = Java.type("com.jsmacrosce.jsmacros.core.config.Option");
const metadata = Config.class.getField("maxLockTime").getAnnotation(Option.class);
Chat.log(metadata.translationKey() + ": " + metadata.type().value());Methods
getter
group
options
Returns the declared no-argument method name supplying choices for the setting, or empty when no provider is specified. The named method returns a
List of choices. Without a provider, enum settings use their constants; non-enum settings have no choices.Returns: choice-provider method name, or empty when none is specified
setter
translationKey
type
type(): OptionType#Returns the setting editor kind and its kind-specific metadata.
Returns: editor-kind and option metadata; by default the kind is
"primitive" with no extra options