diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java index 989a8aa218..71084be470 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java @@ -2,6 +2,8 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; import net.minecraft.server.EntityCat; +import net.minecraft.server.EnumColor; +import org.bukkit.DyeColor; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Cat; import org.bukkit.entity.EntityType; @@ -38,4 +40,14 @@ public class CraftCat extends CraftTameableAnimal implements Cat { getHandle().setCatType(type.ordinal()); } + + @Override + public DyeColor getCollarColor() { + return DyeColor.getByWoolData((byte) getHandle().ei().getColorIndex()); + } + + @Override + public void setCollarColor(DyeColor color) { + getHandle().a(EnumColor.fromColorIndex(color.getWoolData())); + } }