org.bukkit.block
Interface CommandBlock

All Superinterfaces:
BlockState, Metadatable

public interface CommandBlock
extends BlockState


Method Summary
 String getCommand()
          Gets the command that this CommandBlock will run when powered.
 String getName()
          Gets the name of this CommandBlock.
 void setCommand(String command)
          Sets the command that this CommandBlock will run when powered.
 void setName(String name)
          Sets the name of this CommandBlock.
 
Methods inherited from interface org.bukkit.block.BlockState
getBlock, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getTypeId, getWorld, getX, getY, getZ, setData, setRawData, setType, setTypeId, update, update, update
 
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
 

Method Detail

getCommand

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.

Returns:
Command that this CommandBlock will run when powered.

setCommand

void setCommand(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.

Parameters:
command - Command that this CommandBlock will run when powered.

getName

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 "@".

Returns:
Name of this CommandBlock.

setName

void setName(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 "@".

Parameters:
name - New name for this CommandBlock.


Copyright © 2013. All Rights Reserved.