diff --git a/paper-api/src/main/java/org/bukkit/entity/Sheep.java b/paper-api/src/main/java/org/bukkit/entity/Sheep.java index 33fe3ac3b5..98f58ebfb8 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Sheep.java +++ b/paper-api/src/main/java/org/bukkit/entity/Sheep.java @@ -2,6 +2,7 @@ * */ package org.bukkit.entity; +import org.bukkit.material.Colorable; /** * Represents a Sheep. @@ -9,6 +10,6 @@ package org.bukkit.entity; * @author Cogito * */ -public interface Sheep extends Animals { +public interface Sheep extends Animals, Colorable { } diff --git a/paper-api/src/main/java/org/bukkit/material/Colorable.java b/paper-api/src/main/java/org/bukkit/material/Colorable.java new file mode 100644 index 0000000000..05fca12e0c --- /dev/null +++ b/paper-api/src/main/java/org/bukkit/material/Colorable.java @@ -0,0 +1,27 @@ +package org.bukkit.material; + +import org.bukkit.DyeColor; + +/** + * An object that can be colored. + * + * @author Cogito + * + */ +public interface Colorable { + + /** + * Gets the color of this object. + * + * @return The DyeColor of this object. + */ + public DyeColor getColor(); + + /** + * Sets the color of this object to the specified DyeColor. + * + * @param color The color of the object, as a DyeColor. + */ + public void setColor(DyeColor color); + +} diff --git a/paper-api/src/main/java/org/bukkit/material/Dye.java b/paper-api/src/main/java/org/bukkit/material/Dye.java index b5781fc132..aff7abdbf8 100644 --- a/paper-api/src/main/java/org/bukkit/material/Dye.java +++ b/paper-api/src/main/java/org/bukkit/material/Dye.java @@ -7,7 +7,7 @@ import org.bukkit.Material; /** * Represents dye */ -public class Dye extends MaterialData { +public class Dye extends MaterialData implements Colorable { public Dye(final int type) { super(type); } diff --git a/paper-api/src/main/java/org/bukkit/material/Wool.java b/paper-api/src/main/java/org/bukkit/material/Wool.java index e8a0dd7bde..98af83e40c 100644 --- a/paper-api/src/main/java/org/bukkit/material/Wool.java +++ b/paper-api/src/main/java/org/bukkit/material/Wool.java @@ -7,7 +7,7 @@ import org.bukkit.Material; /** * Represents a Wool/Cloth block */ -public class Wool extends MaterialData { +public class Wool extends MaterialData implements Colorable { public Wool(final int type) { super(type); }