Class Command

java.lang.Object
org.bukkit.material.MaterialData
org.bukkit.material.Command
All Implemented Interfaces:
java.lang.Cloneable, Redstone

public class Command
extends MaterialData
implements Redstone
Represents a command block
  • Constructor Details

    • Command

      public Command()
    • Command

      @Deprecated public Command​(int type)
      Deprecated.
      Magic value
      Parameters:
      type - the raw type id
    • Command

      public Command​(Material type)
    • Command

      @Deprecated public Command​(int type, byte data)
      Deprecated.
      Magic value
      Parameters:
      type - the raw type id
      data - the raw data value
    • Command

      @Deprecated public Command​(Material type, byte data)
      Deprecated.
      Magic value
      Parameters:
      type - the type
      data - the raw data value
  • Method Details

    • isPowered

      public boolean isPowered()
      Gets the current state of this Material, indicating if it's powered or unpowered
      Specified by:
      isPowered in interface Redstone
      Returns:
      true if powered, otherwise false
    • setPowered

      public void setPowered​(boolean bool)
      Sets the current state of this Material
      Parameters:
      bool - whether or not the command block is powered
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class MaterialData
    • clone

      public Command clone()
      Overrides:
      clone in class MaterialData