Package net.citizensnpcs.api.command
Class CommandContext
java.lang.Object
net.citizensnpcs.api.command.CommandContext
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCommandContext(boolean clearFlags, CommandSender sender, String[] args) CommandContext(String[] args) CommandContext(CommandSender sender, String[] args) -
Method Summary
Modifier and TypeMethodDescriptionintdoublegetDouble(int index) doublegetDouble(int index, double def) doublegetFlagDouble(String ch) doublegetFlagDouble(String ch, double def) intgetFlagInteger(String ch) intgetFlagInteger(String ch, int def) getFlags()intgetFlagTicks(String ch) intgetFlagTicks(String ch, int def) intgetInteger(int index) intgetInteger(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) intgetTicks(int index) booleanbooleanhasAnyValueFlag(String... strings) booleanhasFlag(char ch) booleanhasValueFlag(String ch) intlength()booleanparseEulerAngle(String input) static LocationparseLocation(Location currentLocation, String flag) static org.joml.QuaternionfparseQuaternion(String string) intparseTicks(String dur) static VectorparseVector(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
-