public enum ForWaypoints extends java.lang.Enum<ForWaypoints> implements IDatatypeFor<IWaypoint[]>
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Method and Description |
---|---|
IWaypoint[] |
get(IDatatypeContext ctx)
Consumes the desired amount of arguments from the specified
IDatatypeContext , and
then returns the parsed value. |
static java.lang.String[] |
getWaypointNames(IBaritone baritone) |
static IWaypoint[] |
getWaypoints(IBaritone baritone) |
static IWaypoint[] |
getWaypointsByName(IBaritone baritone,
java.lang.String name) |
static IWaypoint[] |
getWaypointsByTag(IBaritone baritone,
IWaypoint.Tag tag) |
java.util.stream.Stream<java.lang.String> |
tabComplete(IDatatypeContext ctx)
Attempts to complete missing or partial input provided through the
IArgConsumer } provided by
IDatatypeContext.getConsumer() in order to aide the user in executing commands. |
static ForWaypoints |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ForWaypoints[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
static IWaypointCollection |
waypoints(IBaritone baritone) |
public static final ForWaypoints INSTANCE
public static ForWaypoints[] values()
for (ForWaypoints c : ForWaypoints.values()) System.out.println(c);
public static ForWaypoints valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic IWaypoint[] get(IDatatypeContext ctx) throws CommandException
IDatatypeFor
IDatatypeContext
, and
then returns the parsed value. This method will more than likely return a IllegalArgumentException
if the expected input does not conform to a parseable value. As far as a CommandException
being
thrown is concerned, see the note below for specifics.get
in interface IDatatypeFor<IWaypoint[]>
ctx
- The contextCommandException
- If there was an issue parsing using another type or arguments could not be polled.IDatatypeContext
public java.util.stream.Stream<java.lang.String> tabComplete(IDatatypeContext ctx) throws CommandException
IDatatype
IArgConsumer
} provided by
IDatatypeContext.getConsumer()
in order to aide the user in executing commands.
One benefit over datatypes over IArgParser
s 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.
tabComplete
in interface IDatatype
ctx
- The argument consumer to tab completeCommandException
IArgConsumer.tabCompleteDatatype(IDatatype)
public static IWaypointCollection waypoints(IBaritone baritone)
public static IWaypoint[] getWaypoints(IBaritone baritone)
public static java.lang.String[] getWaypointNames(IBaritone baritone)
public static IWaypoint[] getWaypointsByTag(IBaritone baritone, IWaypoint.Tag tag)
public static IWaypoint[] getWaypointsByName(IBaritone baritone, java.lang.String name)