/FileExtraction/Java_unseen/Wind-Development_WindSpigot/WindSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java
package org.bukkit.craftbukkit.entity;

import org.bukkit.DyeColor;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Wolf;

import net.minecraft.server.EntityWolf;
import net.minecraft.server.EnumColor;

public class CraftWolf extends CraftTameableAnimal implements Wolf {
	public CraftWolf(CraftServer server, EntityWolf wolf) {
		super(server, wolf);
	}

	@Override
	public boolean isAngry() {
		return getHandle().isAngry();
	}

	@Override
	public void setAngry(boolean angry) {
		getHandle().setAngry(angry);
	}

	@Override
	public EntityWolf getHandle() {
		return (EntityWolf) entity;
	}

	@Override
	public EntityType getType() {
		return EntityType.WOLF;
	}

	@Override
	public DyeColor getCollarColor() {
		return DyeColor.getByWoolData((byte) getHandle().getCollarColor().getColorIndex());
	}

	@Override
	public void setCollarColor(DyeColor color) {
		getHandle().setCollarColor(EnumColor.fromColorIndex(color.getWoolData()));
	}
}
