org.bukkit.block.CommandBlock Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chest-server Show documentation
Show all versions of chest-server Show documentation
A spigot fork to kotlin structure and news.
The newest version!
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.
*/
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.
*/
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.
*/
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.
*/
void setName(String name);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy