Class ListType<E>
java.lang.Object
net.ixdarklord.coolcatcore.api.config.type.ListType<E>
- All Implemented Interfaces:
ConfigType<List<E>>
A list whose elements are all of one type (itself possibly constrained), optionally limited in size. Values are
immutable lists. Reading a file drops invalid elements and corrects the rest; typed values must be valid as a whole.
Typed as JSON:
[1, 2, 3], ["a", "b"].-
Method Summary
Modifier and TypeMethodDescriptioncodec()List<net.minecraft.network.chat.Component> describe()The constraints in words, for the file's comments and the screen's tooltips ("Range: 0 ~ 10").intmaxSize()intminSize()Reads a value typed by a player, and validates it.Checks a value, possibly correcting it.withSize(int minSize, int maxSize) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ConfigType
equals, format, suggestions
-
Method Details
-
elementType
-
minSize
public int minSize() -
maxSize
public int maxSize() -
withSize
-
codec
- Specified by:
codecin interfaceConfigType<E>
-
validate
Description copied from interface:ConfigTypeChecks a value, possibly correcting it.- Specified by:
validatein interfaceConfigType<E>
-
parse
Description copied from interface:ConfigTypeReads a value typed by a player, and validates it. By default the text is JSON for the codec.- Specified by:
parsein interfaceConfigType<E>
-
describe
Description copied from interface:ConfigTypeThe constraints in words, for the file's comments and the screen's tooltips ("Range: 0 ~ 10").- Specified by:
describein interfaceConfigType<E>
-