public interface CommandBlock extends BlockState
限定符和类型 | 方法和说明 |
---|---|
java.lang.String |
getCommand()
获取这个命令方块激活时运行的命令。
|
java.lang.String |
getName()
获取这个命令方块的名字.这个名字被用于命令方块执行命令。
|
void |
setCommand(java.lang.String command)
设置这个命令方块激活时运行的命令。
|
void |
setName(java.lang.String name)
设置这个命令方块的名字。
|
getBlock, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getTypeId, getWorld, getX, getY, getZ, isPlaced, setData, setRawData, setType, setTypeId, update, update, update
getMetadata, hasMetadata, removeMetadata, setMetadata
java.lang.String getCommand()
原文:Gets the command that this CommandBlock will run when powered. This will never return null. If the CommandBlock does not have a command, an empty String will be returned instead.
void setCommand(java.lang.String command)
原文:Sets the command that this CommandBlock will run when powered. Setting the command to null is the same as setting it to an empty String.
command
- 当激活时这个命令方块将要运行的命令java.lang.String getName()
原文:Gets the name of this CommandBlock. The name is used with commands that this CommandBlock executes. This name will never be null, and by default is "@".
void setName(java.lang.String name)
原文:Sets the name of this CommandBlock. The name is used with commands that this CommandBlock executes. Setting the name to null is the same as setting it to "@".
name
- 这个命令方块的新名字