Package cn.nukkit.command.utils
Class CommandParser
java.lang.Object
cn.nukkit.command.utils.CommandParser
@Deprecated
@DeprecationDetails(since="1.19.60-r1",
reason="Using the new ParamTree instead",
replaceWith="ParamTree")
@PowerNukkitXOnly
@Since("1.6.0.0-PNX")
public class CommandParser
extends Object
Deprecated.
此命令解析器为旧的基于正则表达式的实现,存在性能问题且编写较混乱
目前已经重写了解析器,应使用新的ParamTree而不是继续使用此实现
-
Constructor Summary
ConstructorDescriptionCommandParser
(Command command, CommandSender sender, String[] args) Deprecated.CommandParser
(Command command, CommandSender sender, String[] args, boolean useParsedArgs) Deprecated.CommandParser
(CommandParser parser) Deprecated.CommandParser
(CommandParser parser, CommandSender sender) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionString[]
getArgs()
Deprecated.Deprecated.int
Deprecated.Deprecated.String[]
Deprecated.Deprecated.Deprecated.boolean
hasNext()
Deprecated.boolean
Deprecated.Deprecated.Deprecated.parseAllRemain
(boolean moveCursor) Deprecated.boolean
Deprecated.boolean
parseBoolean
(boolean moveCursor) Deprecated.double
Deprecated.double
parseDouble
(boolean moveCursor) Deprecated.<T extends Enum<T>>
TDeprecated.<T extends Enum<T>>
TDeprecated.int
parseInt()
Deprecated.int
parseInt
(boolean moveCursor) Deprecated.double
parseOffsetDouble
(double base) Deprecated.double
parseOffsetDouble
(double base, boolean moveCursor) Deprecated.Deprecated.parsePosition
(Vector3 baseVector) Deprecated.parsePosition
(Vector3 baseVector, boolean moveCursor) Deprecated.Deprecated.parseString
(boolean moveCursor) Deprecated.Deprecated.parseTargetPlayers
(boolean moveCursor) Deprecated.Deprecated.parseTargets
(boolean moveCursor) Deprecated.Deprecated.parseVector2
(boolean moveCursor) Deprecated.Deprecated.parseVector3
(Vector3 bv) Deprecated.parseVector3
(Vector3 bv, boolean moveCursor) Deprecated.int
parseWildcardInt
(int defaultValue) Deprecated.int
parseWildcardInt
(int defaultValue, boolean moveCursor) Deprecated.
-
Constructor Details
-
CommandParser
Deprecated. -
CommandParser
Deprecated. -
CommandParser
Deprecated. -
CommandParser
Deprecated.
-
-
Method Details
-
matchCommandForm
Deprecated. -
getTargetLevel
Deprecated. -
hasNext
public boolean hasNext()Deprecated. -
parseInt
Deprecated.- Throws:
CommandSyntaxException
-
parseInt
Deprecated.- Throws:
CommandSyntaxException
-
parseWildcardInt
Deprecated.- Throws:
CommandSyntaxException
-
parseWildcardInt
Deprecated.- Throws:
CommandSyntaxException
-
parseDouble
Deprecated.- Throws:
CommandSyntaxException
-
parseDouble
Deprecated.- Throws:
CommandSyntaxException
-
parseOffsetDouble
Deprecated.- Throws:
CommandSyntaxException
-
parseOffsetDouble
Deprecated.- Throws:
CommandSyntaxException
-
parseBoolean
Deprecated.- Throws:
CommandSyntaxException
-
parseBoolean
Deprecated.- Throws:
CommandSyntaxException
-
parseString
Deprecated.- Throws:
CommandSyntaxException
-
parseString
Deprecated.- Throws:
CommandSyntaxException
-
parseEnum
Deprecated.- Throws:
CommandSyntaxException
-
parseEnum
public <T extends Enum<T>> T parseEnum(Class<T> enumType, boolean moveCursor) throws CommandSyntaxException Deprecated.- Throws:
CommandSyntaxException
-
parseTargets
Deprecated.- Throws:
CommandSyntaxException
-
parseTargets
Deprecated.- Throws:
CommandSyntaxException
-
parseTargetPlayers
Deprecated.- Throws:
CommandSyntaxException
-
parseTargetPlayers
Deprecated.- Throws:
CommandSyntaxException
-
parsePosition
Deprecated.- Throws:
CommandSyntaxException
-
parsePosition
Deprecated.- Throws:
CommandSyntaxException
-
parsePosition
Deprecated.- Throws:
CommandSyntaxException
-
parseVector3
Deprecated.- Throws:
CommandSyntaxException
-
parseVector3
Deprecated.- Throws:
CommandSyntaxException
-
parseVector3
Deprecated.- Throws:
CommandSyntaxException
-
parseVector2
Deprecated.- Throws:
CommandSyntaxException
-
parseVector2
Deprecated.- Throws:
CommandSyntaxException
-
parseAllRemain
Deprecated. -
parseAllRemain
Deprecated. -
getCommand
Deprecated. -
getSender
Deprecated. -
getArgs
Deprecated. -
getParsedArgs
Deprecated. -
getMatchedCommandForm
Deprecated. -
isUseParsedArgs
public boolean isUseParsedArgs()Deprecated. -
getCursor
public int getCursor()Deprecated.
-