mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 19:34:09 +01:00
BlockState for Command Blocks. Adds BUKKIT-3805.
By: Nate Mortensen <nate.richard.mortensen@gmail.com>
This commit is contained in:
parent
410adb8404
commit
9c2b722bd3
1 changed files with 40 additions and 0 deletions
40
paper-api/src/main/java/org/bukkit/block/CommandBlock.java
Normal file
40
paper-api/src/main/java/org/bukkit/block/CommandBlock.java
Normal file
|
@ -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);
|
||||
}
|
Loading…
Reference in a new issue