mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-31 22:22:49 +00:00
SPIGOT-7850: Add API for Bogged shear state
This commit is contained in:
parent
46b6d445c3
commit
ae5e5817e9
3 changed files with 23 additions and 12 deletions
|
@ -6,5 +6,5 @@ import org.jetbrains.annotations.ApiStatus;
|
||||||
* Represents a Bogged Skeleton.
|
* Represents a Bogged Skeleton.
|
||||||
*/
|
*/
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public interface Bogged extends AbstractSkeleton {
|
public interface Bogged extends AbstractSkeleton, Shearable {
|
||||||
}
|
}
|
||||||
|
|
21
src/main/java/org/bukkit/entity/Shearable.java
Normal file
21
src/main/java/org/bukkit/entity/Shearable.java
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
package org.bukkit.entity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents an entity which can be shorn with shears.
|
||||||
|
*/
|
||||||
|
public interface Shearable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets whether the entity is in its sheared state.
|
||||||
|
*
|
||||||
|
* @return Whether the entity is sheared.
|
||||||
|
*/
|
||||||
|
boolean isSheared();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets whether the entity is in its sheared state.
|
||||||
|
*
|
||||||
|
* @param flag Whether to shear the entity
|
||||||
|
*/
|
||||||
|
void setSheared(boolean flag);
|
||||||
|
}
|
|
@ -5,15 +5,5 @@ import org.bukkit.material.Colorable;
|
||||||
/**
|
/**
|
||||||
* Represents a Sheep.
|
* Represents a Sheep.
|
||||||
*/
|
*/
|
||||||
public interface Sheep extends Animals, Colorable {
|
public interface Sheep extends Animals, Colorable, Shearable {
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Whether the sheep is sheared.
|
|
||||||
*/
|
|
||||||
public boolean isSheared();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param flag Whether to shear the sheep
|
|
||||||
*/
|
|
||||||
public void setSheared(boolean flag);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue