Class ConfigKey<T>
java.lang.Object
fr.robie.machineengine.api.config.ConfigKey<T>
One setting of a
ConfigFile: its path (limits.max-machines-per-chunk), its type,
its default, the comment written above it, and whether a reload may change it.
Keys are immutable: comment and restartOnly return a new key. Declare them as
constants and read them with ConfigValues.get(ConfigKey).
-
Method Summary
Modifier and TypeMethodDescriptionOne of the constants oftype, written in lower case with dashes:FAST_MODEisfast-mode.clamped()A number out of range is limited to the nearest bound (with a warning) instead of replaced by the default.A color, written"#RRGGBB"(quoted in YAML); read and written as0xRRGGBB.comment()The comment written above the key when it is added to a file; replaces any earlier comment.@NotNull Stringexpected()What a valid value looks like, for warnings: "a whole number from 0 to 256".booleanA section ofname: textentries, in file order.@NotNull Stringpath()A reload keeps the value the server started with and reports that a restart is needed.Text.A list of texts.toString()sizewhole numbers frommintomax(size0: any number of them).
-
Method Details
-
string
-
color
-
bool
-
integer
-
whole
-
decimal
-
choice
-
wholes
-
strings
-
map
-
comment
-
restartOnly
-
clamped
A number out of range is limited to the nearest bound (with a warning) instead of replaced by the default. Only forinteger(String, int, int, int),whole(String, long, long, long)anddecimal(String, double, double, double)keys. -
path
-
defaultValue
-
comment
-
isRestartOnly
public boolean isRestartOnly() -
expected
What a valid value looks like, for warnings: "a whole number from 0 to 256". -
toString
-