summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorBlackHole <black-hole@live.com>2017-05-15 23:29:02 +0200
committermd_5 <git@md-5.net>2017-05-16 20:23:25 +1000
commit211c15e44665dd0365460fb3330411dca6dbbe53 (patch)
treed2eb16f5e854b2a7b92c92ed5fefd9e49fc409d4 /src/main
parente0de402afc1c68da8a894427bc323d1c9f632ef8 (diff)
downloadbukkit-211c15e44665dd0365460fb3330411dca6dbbe53.tar
bukkit-211c15e44665dd0365460fb3330411dca6dbbe53.tar.gz
bukkit-211c15e44665dd0365460fb3330411dca6dbbe53.tar.lz
bukkit-211c15e44665dd0365460fb3330411dca6dbbe53.tar.xz
bukkit-211c15e44665dd0365460fb3330411dca6dbbe53.zip
SPIGOT-3246: Use Sittable for Ocelot, Wolf and Parrot
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/bukkit/entity/Ocelot.java17
-rw-r--r--src/main/java/org/bukkit/entity/Parrot.java2
-rw-r--r--src/main/java/org/bukkit/entity/Sittable.java23
-rw-r--r--src/main/java/org/bukkit/entity/Wolf.java18
4 files changed, 26 insertions, 34 deletions
diff --git a/src/main/java/org/bukkit/entity/Ocelot.java b/src/main/java/org/bukkit/entity/Ocelot.java
index d5d034d8..0005970a 100644
--- a/src/main/java/org/bukkit/entity/Ocelot.java
+++ b/src/main/java/org/bukkit/entity/Ocelot.java
@@ -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.
@@ -21,21 +21,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.
*/
public enum Type {
diff --git a/src/main/java/org/bukkit/entity/Parrot.java b/src/main/java/org/bukkit/entity/Parrot.java
index 26065b7e..ccd3d1ff 100644
--- a/src/main/java/org/bukkit/entity/Parrot.java
+++ b/src/main/java/org/bukkit/entity/Parrot.java
@@ -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.
diff --git a/src/main/java/org/bukkit/entity/Sittable.java b/src/main/java/org/bukkit/entity/Sittable.java
new file mode 100644
index 00000000..ea6ee26f
--- /dev/null
+++ b/src/main/java/org/bukkit/entity/Sittable.java
@@ -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);
+
+}
diff --git a/src/main/java/org/bukkit/entity/Wolf.java b/src/main/java/org/bukkit/entity/Wolf.java
index 9d5a896e..c0905c05 100644
--- a/src/main/java/org/bukkit/entity/Wolf.java
+++ b/src/main/java/org/bukkit/entity/Wolf.java
@@ -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
@@ -25,22 +25,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
*
* @return the color of the collar