mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 19:34:09 +01:00
SPIGOT-3246: Use Sittable for Ocelot, Wolf and Parrot
By: BlackHole <black-hole@live.com>
This commit is contained in:
parent
331d059798
commit
d3b7eee1f4
4 changed files with 26 additions and 34 deletions
|
@ -4,7 +4,7 @@ package org.bukkit.entity;
|
|||
/**
|
||||
* A wild tameable cat
|
||||
*/
|
||||
public interface Ocelot extends Animals, Tameable {
|
||||
public interface Ocelot extends Animals, Tameable, Sittable {
|
||||
|
||||
/**
|
||||
* Gets the current type of this cat.
|
||||
|
@ -20,21 +20,6 @@ public interface Ocelot extends Animals, Tameable {
|
|||
*/
|
||||
public void setCatType(Type type);
|
||||
|
||||
/**
|
||||
* Checks if this ocelot is sitting
|
||||
*
|
||||
* @return true if sitting
|
||||
*/
|
||||
public boolean isSitting();
|
||||
|
||||
/**
|
||||
* Sets if this ocelot is sitting. Will remove any path that the ocelot
|
||||
* was following beforehand.
|
||||
*
|
||||
* @param sitting true if sitting
|
||||
*/
|
||||
public void setSitting(boolean sitting);
|
||||
|
||||
/**
|
||||
* Represents the various different cat types there are.
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@ package org.bukkit.entity;
|
|||
/**
|
||||
* Represents a Parrot.
|
||||
*/
|
||||
public interface Parrot extends Animals, Tameable {
|
||||
public interface Parrot extends Animals, Tameable, Sittable {
|
||||
|
||||
/**
|
||||
* Get the variant of this parrot.
|
||||
|
|
23
paper-api/src/main/java/org/bukkit/entity/Sittable.java
Normal file
23
paper-api/src/main/java/org/bukkit/entity/Sittable.java
Normal file
|
@ -0,0 +1,23 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
/**
|
||||
* An animal that can sit still.
|
||||
*/
|
||||
public interface Sittable {
|
||||
|
||||
/**
|
||||
* Checks if this animal is sitting
|
||||
*
|
||||
* @return true if sitting
|
||||
*/
|
||||
boolean isSitting();
|
||||
|
||||
/**
|
||||
* Sets if this animal is sitting. Will remove any path that the animal
|
||||
* was following beforehand.
|
||||
*
|
||||
* @param sitting true if sitting
|
||||
*/
|
||||
void setSitting(boolean sitting);
|
||||
|
||||
}
|
|
@ -5,7 +5,7 @@ import org.bukkit.DyeColor;
|
|||
/**
|
||||
* Represents a Wolf
|
||||
*/
|
||||
public interface Wolf extends Animals, Tameable {
|
||||
public interface Wolf extends Animals, Tameable, Sittable {
|
||||
|
||||
/**
|
||||
* Checks if this wolf is angry
|
||||
|
@ -24,22 +24,6 @@ public interface Wolf extends Animals, Tameable {
|
|||
*/
|
||||
public void setAngry(boolean angry);
|
||||
|
||||
/**
|
||||
* Checks if this wolf is sitting
|
||||
*
|
||||
* @return true if sitting
|
||||
*/
|
||||
public boolean isSitting();
|
||||
|
||||
/**
|
||||
* Sets if this wolf is sitting.
|
||||
* <p>
|
||||
* Will remove any path that the wolf was following beforehand.
|
||||
*
|
||||
* @param sitting true if sitting
|
||||
*/
|
||||
public void setSitting(boolean sitting);
|
||||
|
||||
/**
|
||||
* Get the collar color of this wolf
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue