Package net.citizensnpcs.api.command
Class CommandContext
java.lang.Object
net.citizensnpcs.api.command.CommandContext
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCommandContext
(boolean clearFlags, CommandSender sender, String[] args) CommandContext
(String[] args) CommandContext
(CommandSender sender, String[] args) -
Method Summary
Modifier and TypeMethodDescriptionint
double
getDouble
(int index) double
getDouble
(int index, double def) double
getFlagDouble
(String ch) double
getFlagDouble
(String ch, double def) int
getFlagInteger
(String ch) int
getFlagInteger
(String ch, int def) getFlags()
int
getFlagTicks
(String ch) int
getFlagTicks
(String ch, int def) int
getInteger
(int index) int
getInteger
(int index, int def) getJoinedStrings
(int initialIndex) getJoinedStrings
(int initialIndex, char delimiter) String[]
getPaddedSlice
(int index, int padding) String[]
getSlice
(int index) getString
(int index) int
getTicks
(int index) boolean
boolean
hasAnyValueFlag
(String... strings) boolean
hasFlag
(char ch) boolean
hasValueFlag
(String ch) int
length()
boolean
parseEulerAngle
(String input) static Location
parseLocation
(Location currentLocation, String flag) static org.joml.Quaternionf
parseQuaternion
(String string) int
parseTicks
(String dur) static Vector
parseVector
(String string)
-
Field Details
-
args
-
flags
-
valueFlags
-
-
Constructor Details
-
CommandContext
-
CommandContext
-
CommandContext
-
-
Method Details
-
argsLength
public int argsLength() -
getCommand
-
getDouble
- Throws:
NumberFormatException
-
getDouble
- Throws:
NumberFormatException
-
getFlag
-
getFlag
-
getFlagDouble
- Throws:
NumberFormatException
-
getFlagDouble
- Throws:
NumberFormatException
-
getFlagInteger
- Throws:
NumberFormatException
-
getFlagInteger
- Throws:
NumberFormatException
-
getFlags
-
getFlagTicks
- Throws:
NumberFormatException
-
getFlagTicks
- Throws:
NumberFormatException
-
getInteger
- Throws:
NumberFormatException
-
getInteger
- Throws:
NumberFormatException
-
getJoinedStrings
-
getJoinedStrings
-
getPaddedSlice
-
getRawCommand
-
getSenderLocation
- Throws:
CommandException
-
getSenderTargetBlockLocation
- Throws:
CommandException
-
getSlice
-
getString
-
getString
-
getTicks
- Throws:
NumberFormatException
-
getValueFlags
-
hasAnyFlags
public boolean hasAnyFlags() -
hasAnyValueFlag
-
hasFlag
public boolean hasFlag(char ch) -
hasValueFlag
-
length
public int length() -
matches
-
parseEulerAngle
-
parseTicks
-
parseLocation
- Throws:
CommandException
-
parseQuaternion
-
parseVector
-