Interface Colorable

All Known Subinterfaces:
Bed, HangingSign, Sheep, Shulker, Sign
All Known Implementing Classes:
Dye, Wool

public interface Colorable
An object that can be colored.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the color of this object.
    void
    Sets the color of this object to the specified DyeColor.
  • Method Details

    • getColor

      @Nullable DyeColor getColor()
      Gets the color of this object.
      This may be null to represent the default color of an object, if the object has a special default color (e.g Shulkers).
      Returns:
      The DyeColor of this object.
    • setColor

      void setColor(DyeColor color)
      Sets the color of this object to the specified DyeColor.
      This may be null to represent the default color of an object, if the object has a special default color (e.g Shulkers).
      Parameters:
      color - The color of the object, as a DyeColor.
      Throws:
      NullPointerException - if argument is null and this implementation does not support null