Class Command

All Implemented Interfaces:
Cloneable, Redstone

@Deprecated(forRemoval=true, since="1.13") public class Command extends MaterialData implements Redstone
Deprecated, for removal: This API element is subject to removal in a future version.
all usage of MaterialData is deprecated and subject to removal. Use BlockData.
Represents a command block
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Command(Material type, byte data)
    Deprecated.
    Magic value
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the current state of this Material, indicating if it's powered or unpowered
    void
    setPowered(boolean bool)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the current state of this Material
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class org.bukkit.material.MaterialData

    equals, getData, getItemType, hashCode, setData, toItemStack, toItemStack

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Command

      public Command()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • Command

      public Command(Material type)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • 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()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the current state of this Material
      Parameters:
      bool - whether or not the command block is powered
    • toString

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class MaterialData
    • clone

      public Command clone()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      clone in class MaterialData