Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
CommandBlock.java
1 package org.bukkit.block;
2 
3 public interface CommandBlock extends BlockState {
4 
5  /**
6  * Gets the command that this CommandBlock will run when powered.
7  * This will never return null. If the CommandBlock does not have a
8  * command, an empty String will be returned instead.
9  *
10  * @return Command that this CommandBlock will run when powered.
11  */
12  public String getCommand();
13 
14  /**
15  * Sets the command that this CommandBlock will run when powered.
16  * Setting the command to null is the same as setting it to an empty
17  * String.
18  *
19  * @param command Command that this CommandBlock will run when powered.
20  */
21  public void setCommand(String command);
22 
23  /**
24  * Gets the name of this CommandBlock. The name is used with commands
25  * that this CommandBlock executes. This name will never be null, and
26  * by default is "@".
27  *
28  * @return Name of this CommandBlock.
29  */
30  public String getName();
31 
32  /**
33  * Sets the name of this CommandBlock. The name is used with commands
34  * that this CommandBlock executes. Setting the name to null is the
35  * same as setting it to "@".
36  *
37  * @param name New name for this CommandBlock.
38  */
39  public void setName(String name);
40 }
void setCommand(String command)
void setName(String name)