Package cn.nukkit.command.tree.node
Class PositionNode
- All Implemented Interfaces:
IParamNode<Position>
- Direct Known Subclasses:
FloatPositionNode
,IntPositionNode
@PowerNukkitXOnly
@Since("1.19.60-r1")
public abstract class PositionNode
extends ParamNode<Position>
坐标节点基类
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final double[]
protected byte
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
负责填充该参数节点,覆写该方法需要实现对接受参数arg的验证以及解析成为对应类型T的结果
当验证失败或者解析失败,请调用IParamNode.error(String)
方法标记错误.形如this.error()
<E> E
get()
<E> E
boolean
getRelative
(int index) void
reset()
将节点重置回初始化状态,以待下次填充IParamNode.fill(String)
void
setRelative
(byte index) Methods inherited from class cn.nukkit.command.tree.node.ParamNode
getParent, hasResult, init, isOptional
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.tree.node.IParamNode
error, error, error, error
-
Field Details
-
coordinate
protected final double[] coordinate -
TMP
-
index
protected byte index
-
-
Constructor Details
-
PositionNode
-
-
Method Details
-
get
public <E> E get()Description copied from interface:IParamNode
-
get
-
fill
Description copied from interface:IParamNode
负责填充该参数节点,覆写该方法需要实现对接受参数arg的验证以及解析成为对应类型T的结果
当验证失败或者解析失败,请调用IParamNode.error(String)
方法标记错误.形如this.error()
- Parameters:
arg
- the arg
-
reset
public void reset()Description copied from interface:IParamNode
将节点重置回初始化状态,以待下次填充IParamNode.fill(String)
-
setRelative
public void setRelative(byte index) -
getRelative
public boolean getRelative(int index)
-