Class ScopeArgument
java.lang.Object
cn.nukkit.command.selector.args.impl.ScopeArgument
- All Implemented Interfaces:
ISelectorArgument
,Comparable<ISelectorArgument>
@PowerNukkitXOnly
@Since("1.19.60-r1")
public abstract class ScopeArgument
extends Object
implements ISelectorArgument
args like dx,dy,dz.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetDefaultValue
(Map<String, List<String>> values, SelectorType selectorType, CommandSender sender) 若一个参数有默认值(即此方法返回非null值),则在解析时若给定参数表中没有此参数,会以此默认值参与解析int
解析优先级定义了各个参数的解析顺序Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface cn.nukkit.command.selector.args.ISelectorArgument
compareTo, getFilter, getKeyName, getPredicate, isFilter
-
Constructor Details
-
ScopeArgument
public ScopeArgument()
-
-
Method Details
-
getPriority
public int getPriority()Description copied from interface:ISelectorArgument
解析优先级定义了各个参数的解析顺序 优先级越高(数字越小)的参数,其越先被解析,且其解析结果将会影响下个参数的解析- Specified by:
getPriority
in interfaceISelectorArgument
- Returns:
- 此参数的解析优先级
-
getDefaultValue
@Nullable public String getDefaultValue(Map<String, List<String>> values, SelectorType selectorType, CommandSender sender) Description copied from interface:ISelectorArgument
若一个参数有默认值(即此方法返回非null值),则在解析时若给定参数表中没有此参数,会以此默认值参与解析- Specified by:
getDefaultValue
in interfaceISelectorArgument
- Parameters:
values
- 参数列表selectorType
- 选择器类型sender
- 命令执行者- Returns:
- 此参数的默认值
-