116 lines
2.3 KiB
Java
116 lines
2.3 KiB
Java
package org.bukkit.entity;
|
|
|
|
import java.util.Locale;
|
|
import org.bukkit.DyeColor;
|
|
import org.bukkit.Keyed;
|
|
import org.bukkit.NamespacedKey;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
/**
|
|
* Represents a Wolf
|
|
*/
|
|
public interface Wolf extends Tameable, Sittable {
|
|
|
|
/**
|
|
* Checks if this wolf is angry
|
|
*
|
|
* @return Anger true if angry
|
|
*/
|
|
public boolean isAngry();
|
|
|
|
/**
|
|
* Sets the anger of this wolf.
|
|
* <p>
|
|
* An angry wolf can not be fed or tamed.
|
|
*
|
|
* @param angry true if angry
|
|
* @see #setTarget(org.bukkit.entity.LivingEntity)
|
|
*/
|
|
public void setAngry(boolean angry);
|
|
|
|
/**
|
|
* Get the collar color of this wolf
|
|
*
|
|
* @return the color of the collar
|
|
*/
|
|
@NotNull
|
|
public DyeColor getCollarColor();
|
|
|
|
/**
|
|
* Set the collar color of this wolf
|
|
*
|
|
* @param color the color to apply
|
|
*/
|
|
public void setCollarColor(@NotNull DyeColor color);
|
|
|
|
/**
|
|
* Gets whether the wolf is wet
|
|
*
|
|
* @return Whether the wolf is wet
|
|
*/
|
|
public boolean isWet();
|
|
|
|
/**
|
|
* Gets the wolf's tail angle in radians
|
|
*
|
|
* @return The angle of the wolf's tail in radians
|
|
*/
|
|
public float getTailAngle();
|
|
|
|
/**
|
|
* Gets if the wolf is interested
|
|
*
|
|
* @return Whether the wolf is interested
|
|
*/
|
|
public boolean isInterested();
|
|
|
|
/**
|
|
* Set wolf to be interested
|
|
*
|
|
* @param interested Whether the wolf is interested
|
|
*/
|
|
public void setInterested(boolean interested);
|
|
|
|
/**
|
|
* Get the variant of this wolf.
|
|
*
|
|
* @return wolf variant
|
|
*/
|
|
@NotNull
|
|
Variant getVariant();
|
|
|
|
/**
|
|
* Set the variant of this wolf.
|
|
*
|
|
* @param variant wolf variant
|
|
*/
|
|
void setVariant(@NotNull Variant variant);
|
|
|
|
/**
|
|
* Represents the variant of a wolf.
|
|
*/
|
|
public enum Variant implements Keyed {
|
|
|
|
PALE,
|
|
SPOTTED,
|
|
SNOWY,
|
|
BLACK,
|
|
ASHEN,
|
|
RUSTY,
|
|
WOODS,
|
|
CHESTNUT,
|
|
STRIPED;
|
|
private final NamespacedKey key;
|
|
|
|
private Variant() {
|
|
this.key = NamespacedKey.minecraft(name().toLowerCase(Locale.ROOT));
|
|
}
|
|
|
|
@NotNull
|
|
@Override
|
|
public NamespacedKey getKey() {
|
|
return key;
|
|
}
|
|
}
|
|
}
|