Table of Contents

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

StringArgParser

Block(string)

public CollectibleArgParser Block(string argName)

Parameters

argName string

Returns

CollectibleArgParser

Bool(string, string)

public BoolArgParser Bool(string argName, string trueAlias = "on")

Parameters

argName string
trueAlias string

Returns

BoolArgParser

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

ColorArgParser

DateTime(string)

Currently only supports time spans (i.e. now + time)

public DatetimeArgParser DateTime(string argName)

Parameters

argName string

Returns

DatetimeArgParser

Double(string)

public DoubleArgParser Double(string argName)

Parameters

argName string

Returns

DoubleArgParser

DoubleRange(string, double, double)

public DoubleArgParser DoubleRange(string argName, double min, double max)

Parameters

argName string
min double
max double

Returns

DoubleArgParser

Entities(string)

public EntitiesArgParser Entities(string argName)

Parameters

argName string

Returns

EntitiesArgParser

EntityType(string)

public EntityTypeArgParser EntityType(string argName)

Parameters

argName string

Returns

EntityTypeArgParser

Float(string)

public FloatArgParser Float(string argName)

Parameters

argName string

Returns

FloatArgParser

Int(string)

public IntArgParser Int(string argName)

Parameters

argName string

Returns

IntArgParser

IntDirection(string)

public DirectionArgParser<Vec3i> IntDirection(string argName)

Parameters

argName string

Returns

DirectionArgParser<Vec3i>

IntRange(string, int, int)

public IntArgParser IntRange(string argName, int min, int max)

Parameters

argName string
min int
max int

Returns

IntArgParser

Item(string)

public CollectibleArgParser Item(string argName)

Parameters

argName string

Returns

CollectibleArgParser

Long(string)

public LongArgParser Long(string argName)

Parameters

argName string

Returns

LongArgParser

OnlinePlayer(string)

A currently online player

public OnlinePlayerArgParser OnlinePlayer(string argName)

Parameters

argName string

Returns

OnlinePlayerArgParser

OptionalAll(string)

All remaining arguments together

public StringArgParser OptionalAll(string argName)

Parameters

argName string

Returns

StringArgParser

OptionalBool(string, string)

public BoolArgParser OptionalBool(string argName, string trueAlias = "on")

Parameters

argName string
trueAlias string

Returns

BoolArgParser

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

ColorArgParser

OptionalDouble(string, double)

public DoubleArgParser OptionalDouble(string argName, double defaultvalue = 0)

Parameters

argName string
defaultvalue double

Returns

DoubleArgParser

OptionalEntities(string)

Defaults to caller entity

public EntitiesArgParser OptionalEntities(string argName)

Parameters

argName string

Returns

EntitiesArgParser

OptionalFloat(string, float)

public FloatArgParser OptionalFloat(string argName, float defaultvalue = 0)

Parameters

argName string
defaultvalue float

Returns

FloatArgParser

OptionalInt(string, int)

public IntArgParser OptionalInt(string argName, int defaultValue = 0)

Parameters

argName string
defaultValue int

Returns

IntArgParser

OptionalIntRange(string, int, int, int)

public IntArgParser OptionalIntRange(string argName, int min, int max, int defaultValue = 0)

Parameters

argName string
min int
max int
defaultValue int

Returns

IntArgParser

OptionalLong(string, int)

public LongArgParser OptionalLong(string argName, int defaultValue = 0)

Parameters

argName string
defaultValue int

Returns

LongArgParser

OptionalPlayerRole(string)

Parses IPlayerRole, only works on Serverside since it needs the Serverconfig

public PlayerRoleArgParser OptionalPlayerRole(string argName)

Parameters

argName string

Returns

PlayerRoleArgParser

OptionalPlayerUids(string)

All selected players

public PlayersArgParser OptionalPlayerUids(string argName)

Parameters

argName string

Returns

PlayersArgParser

OptionalPrivilege(string)

public PrivilegeArgParser OptionalPrivilege(string privilege)

Parameters

privilege string

Returns

PrivilegeArgParser

OptionalVec3i(string)

public Vec3iArgParser OptionalVec3i(string argName)

Parameters

argName string

Returns

Vec3iArgParser

OptionalWord(string)

public WordArgParser OptionalWord(string argName)

Parameters

argName string

Returns

WordArgParser

OptionalWordRange(string, params string[])

public WordRangeArgParser OptionalWordRange(string argName, params string[] words)

Parameters

argName string
words string[]

Returns

WordRangeArgParser

OptionalWorldPosition(string)

Defaults to caller position

public WorldPositionArgParser OptionalWorldPosition(string argName)

Parameters

argName string

Returns

WorldPositionArgParser

PlayerRole(string)

Parses IPlayerRole, only works on Serverside since it needs the Serverconfig

public PlayerRoleArgParser PlayerRole(string argName)

Parameters

argName string

Returns

PlayerRoleArgParser

PlayerUids(string)

All selected players

public PlayersArgParser PlayerUids(string argName)

Parameters

argName string

Returns

PlayersArgParser

Privilege(string)

public PrivilegeArgParser Privilege(string privilege)

Parameters

privilege string

Returns

PrivilegeArgParser

Unparsed(string, params string[])

public UnparsedArg Unparsed(string argname, params string[] validRange)

Parameters

argname string
validRange string[]

Returns

UnparsedArg

Vec3i(string)

public Vec3iArgParser Vec3i(string argName)

Parameters

argName string

Returns

Vec3iArgParser

Word(string)

public WordArgParser Word(string argName)

Parameters

argName string

Returns

WordArgParser

Word(string, string[])

public WordArgParser Word(string argName, string[] wordSuggestions)

Parameters

argName string
wordSuggestions string[]

Returns

WordArgParser

WordRange(string, params string[])

public WordRangeArgParser WordRange(string argName, params string[] words)

Parameters

argName string
words string[]

Returns

WordRangeArgParser

WorldPosition(string)

public WorldPositionArgParser WorldPosition(string argName)

Parameters

argName string

Returns

WorldPositionArgParser

WorldPosition2D(string)

public WorldPosition2DArgParser WorldPosition2D(string argName)

Parameters

argName string

Returns

WorldPosition2DArgParser