Class CommandArgumentParsers
- Namespace
- Vintagestory.API.Common
- Assembly
- VintagestoryAPI.dll
public class CommandArgumentParsers
- Inheritance
-
CommandArgumentParsers
- Inherited Members
- Extension Methods
Constructors
CommandArgumentParsers(ICoreAPI)
public CommandArgumentParsers(ICoreAPI api)
Parameters
api
ICoreAPI
Methods
All(string)
All remaining arguments together
public StringArgParser All(string argName)
Parameters
argName
string
Returns
Block(string)
public CollectibleArgParser Block(string argName)
Parameters
argName
string
Returns
Bool(string, string)
public BoolArgParser Bool(string argName, string trueAlias = "on")
Parameters
Returns
Color(string)
Parses a string which is either a color name or a hex value as a Color
public ColorArgParser Color(string argName)
Parameters
argName
string
Returns
DateTime(string)
Currently only supports time spans (i.e. now + time)
public DatetimeArgParser DateTime(string argName)
Parameters
argName
string
Returns
Double(string)
public DoubleArgParser Double(string argName)
Parameters
argName
string
Returns
DoubleRange(string, double, double)
public DoubleArgParser DoubleRange(string argName, double min, double max)
Parameters
Returns
Entities(string)
public EntitiesArgParser Entities(string argName)
Parameters
argName
string
Returns
EntityType(string)
public EntityTypeArgParser EntityType(string argName)
Parameters
argName
string
Returns
Float(string)
public FloatArgParser Float(string argName)
Parameters
argName
string
Returns
Int(string)
public IntArgParser Int(string argName)
Parameters
argName
string
Returns
IntDirection(string)
public DirectionArgParser<Vec3i> IntDirection(string argName)
Parameters
argName
string
Returns
IntRange(string, int, int)
public IntArgParser IntRange(string argName, int min, int max)
Parameters
Returns
Item(string)
public CollectibleArgParser Item(string argName)
Parameters
argName
string
Returns
Long(string)
public LongArgParser Long(string argName)
Parameters
argName
string
Returns
OnlinePlayer(string)
A currently online player
public OnlinePlayerArgParser OnlinePlayer(string argName)
Parameters
argName
string
Returns
OptionalAll(string)
All remaining arguments together
public StringArgParser OptionalAll(string argName)
Parameters
argName
string
Returns
OptionalBool(string, string)
public BoolArgParser OptionalBool(string argName, string trueAlias = "on")
Parameters
Returns
OptionalColor(string)
Parses a string which is either a color name or a hex value as a Color
public ColorArgParser OptionalColor(string argName)
Parameters
argName
string
Returns
OptionalDouble(string, double)
public DoubleArgParser OptionalDouble(string argName, double defaultvalue = 0)
Parameters
Returns
OptionalEntities(string)
Defaults to caller entity
public EntitiesArgParser OptionalEntities(string argName)
Parameters
argName
string
Returns
OptionalFloat(string, float)
public FloatArgParser OptionalFloat(string argName, float defaultvalue = 0)
Parameters
Returns
OptionalInt(string, int)
public IntArgParser OptionalInt(string argName, int defaultValue = 0)
Parameters
Returns
OptionalIntRange(string, int, int, int)
public IntArgParser OptionalIntRange(string argName, int min, int max, int defaultValue = 0)
Parameters
Returns
OptionalLong(string, int)
public LongArgParser OptionalLong(string argName, int defaultValue = 0)
Parameters
Returns
OptionalPlayerRole(string)
Parses IPlayerRole, only works on Serverside since it needs the Serverconfig
public PlayerRoleArgParser OptionalPlayerRole(string argName)
Parameters
argName
string
Returns
OptionalPlayerUids(string)
All selected players
public PlayersArgParser OptionalPlayerUids(string argName)
Parameters
argName
string
Returns
OptionalPrivilege(string)
public PrivilegeArgParser OptionalPrivilege(string privilege)
Parameters
privilege
string
Returns
OptionalVec3i(string)
public Vec3iArgParser OptionalVec3i(string argName)
Parameters
argName
string
Returns
OptionalWord(string)
public WordArgParser OptionalWord(string argName)
Parameters
argName
string
Returns
OptionalWordRange(string, params string[])
public WordRangeArgParser OptionalWordRange(string argName, params string[] words)
Parameters
Returns
OptionalWorldPosition(string)
Defaults to caller position
public WorldPositionArgParser OptionalWorldPosition(string argName)
Parameters
argName
string
Returns
PlayerRole(string)
Parses IPlayerRole, only works on Serverside since it needs the Serverconfig
public PlayerRoleArgParser PlayerRole(string argName)
Parameters
argName
string
Returns
PlayerUids(string)
All selected players
public PlayersArgParser PlayerUids(string argName)
Parameters
argName
string
Returns
Privilege(string)
public PrivilegeArgParser Privilege(string privilege)
Parameters
privilege
string
Returns
Unparsed(string, params string[])
public UnparsedArg Unparsed(string argname, params string[] validRange)
Parameters
Returns
Vec3i(string)
public Vec3iArgParser Vec3i(string argName)
Parameters
argName
string
Returns
Word(string)
public WordArgParser Word(string argName)
Parameters
argName
string
Returns
Word(string, string[])
public WordArgParser Word(string argName, string[] wordSuggestions)
Parameters
Returns
WordRange(string, params string[])
public WordRangeArgParser WordRange(string argName, params string[] words)
Parameters
Returns
WorldPosition(string)
public WorldPositionArgParser WorldPosition(string argName)
Parameters
argName
string
Returns
WorldPosition2D(string)
public WorldPosition2DArgParser WorldPosition2D(string argName)
Parameters
argName
string