diff options
author | feildmaster <admin@feildmaster.com> | 2012-12-05 18:08:31 -0600 |
---|---|---|
committer | feildmaster <admin@feildmaster.com> | 2012-12-05 18:08:31 -0600 |
commit | 6a04fd98ad613cc85533c914950db0d385560bfa (patch) | |
tree | e192d15ffb8ee5af9e2733c51c7eece2d0e59e75 /src/main | |
parent | bb60e85fffaccaa853046fe822b34768f973731f (diff) | |
download | craftbukkit-6a04fd98ad613cc85533c914950db0d385560bfa.tar craftbukkit-6a04fd98ad613cc85533c914950db0d385560bfa.tar.gz craftbukkit-6a04fd98ad613cc85533c914950db0d385560bfa.tar.lz craftbukkit-6a04fd98ad613cc85533c914950db0d385560bfa.tar.xz craftbukkit-6a04fd98ad613cc85533c914950db0d385560bfa.zip |
Implement API for wolves collar color. Adds BUKKIT-3109
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java index d3178012..e266c98a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java @@ -1,6 +1,7 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityWolf; +import org.bukkit.DyeColor; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Wolf; @@ -27,4 +28,12 @@ public class CraftWolf extends CraftTameableAnimal implements Wolf { public EntityType getType() { return EntityType.WOLF; } + + public DyeColor getCollarColor() { + return DyeColor.getByData((byte) getHandle().getCollarColor()); + } + + public void setCollarColor(DyeColor color) { + getHandle().setCollarColor(color.getData()); + } } |