summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authorAndrew Ardill <andrew.ardill@gmail.com>2011-02-12 12:29:22 +1100
committerAndrew Ardill <andrew.ardill@gmail.com>2011-02-12 12:29:22 +1100
commitc097fd9ac546809ab99d8bbbf73b49a8d8e4a880 (patch)
treea25c54ad0e89e85876be5f9922f1e776f4616b08 /src/main/java/org
parent09c6389b3f8fb54496171b08497f755d32589062 (diff)
downloadcraftbukkit-c097fd9ac546809ab99d8bbbf73b49a8d8e4a880.tar
craftbukkit-c097fd9ac546809ab99d8bbbf73b49a8d8e4a880.tar.gz
craftbukkit-c097fd9ac546809ab99d8bbbf73b49a8d8e4a880.tar.lz
craftbukkit-c097fd9ac546809ab99d8bbbf73b49a8d8e4a880.tar.xz
craftbukkit-c097fd9ac546809ab99d8bbbf73b49a8d8e4a880.zip
Added implementation of Colorable to CraftSheep
inspired by xpansive
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java
index 9ce015d0..2135c9c5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java
@@ -2,6 +2,7 @@ package org.bukkit.craftbukkit.entity;
import net.minecraft.server.EntitySheep;
+import org.bukkit.DyeColor;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.Sheep;
@@ -16,4 +17,14 @@ public class CraftSheep extends CraftAnimals implements Sheep {
return "CraftSheep";
}
+ public DyeColor getColor() {
+ EntitySheep entity = (EntitySheep) getHandle();
+ return DyeColor.getByData((byte) entity.e_());
+ }
+
+ public void setColor(DyeColor color) {
+ EntitySheep entity = (EntitySheep) getHandle();
+ entity.a(color.getData());
+ }
+
}