From 6a04fd98ad613cc85533c914950db0d385560bfa Mon Sep 17 00:00:00 2001 From: feildmaster Date: Wed, 5 Dec 2012 18:08:31 -0600 Subject: [PATCH] Implement API for wolves collar color. Adds BUKKIT-3109 --- .../java/org/bukkit/craftbukkit/entity/CraftWolf.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java index d317801224..e266c98a92 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()); + } }