diff options
author | Nate Mortensen <nate.richard.mortensen@gmail.com> | 2013-03-19 20:51:03 -0600 |
---|---|---|
committer | Nate Mortensen <nate.richard.mortensen@gmail.com> | 2013-03-19 20:51:03 -0600 |
commit | 862c421230f251b2b029d259630d1608caf54257 (patch) | |
tree | 9526de05c84b5f92dfec776909b76ba66a6c2f8f /src/main/java/org | |
parent | 1edebf7bcbd455c26ee38a3c3d665b8fab3e4690 (diff) | |
download | bukkit-862c421230f251b2b029d259630d1608caf54257.tar bukkit-862c421230f251b2b029d259630d1608caf54257.tar.gz bukkit-862c421230f251b2b029d259630d1608caf54257.tar.lz bukkit-862c421230f251b2b029d259630d1608caf54257.tar.xz bukkit-862c421230f251b2b029d259630d1608caf54257.zip |
BlockState for Command Blocks. Adds BUKKIT-3805.
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/block/CommandBlock.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/block/CommandBlock.java b/src/main/java/org/bukkit/block/CommandBlock.java new file mode 100644 index 00000000..01e37251 --- /dev/null +++ b/src/main/java/org/bukkit/block/CommandBlock.java @@ -0,0 +1,40 @@ +package org.bukkit.block;
+
+public interface CommandBlock extends BlockState {
+
+ /**
+ * 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.
+ *
+ * @return Command that this CommandBlock will run when powered.
+ */
+ public String getCommand();
+
+ /**
+ * 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.
+ *
+ * @param command Command that this CommandBlock will run when powered.
+ */
+ public void setCommand(String command);
+
+ /**
+ * 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 "@".
+ *
+ * @return Name of this CommandBlock.
+ */
+ public String getName();
+
+ /**
+ * 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 "@".
+ *
+ * @param name New name for this CommandBlock.
+ */
+ public void setName(String name);
+}
|