public interface IDatatype
IDatatypeis similar to an
IArgParserin the sense that it is capable of consuming an argument to transform it into a usable form as the code desires.
A fundamental difference is that an
IDatatype is capable of consuming multiple arguments. For example,
RelativeBlockPos is an
IDatatypePost which requires at least 3
to be specified.
Another difference is that an
IDatatype can be tab-completed, providing comprehensive auto completion
that can substitute based on existing input or provide possibilities for the next piece of input.
java.util.stream.Stream<java.lang.String> tabComplete(IDatatypeContext ctx) throws CommandException
IArgConsumer} provided by
IDatatypeContext.getConsumer()in order to aide the user in executing commands.
One benefit over datatypes over
IArgParsers is that instead of each command trying to guess what values
the datatype will accept, or simply not tab completing at all, datatypes that support tab completion can provide
accurate information using the same methods used to parse arguments in the first place.