summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorriking <rikingcoding@gmail.com>2013-04-01 13:30:47 -0700
committerturt2live <travpc@gmail.com>2014-08-17 11:36:06 -0600
commitf0ab5b0aec4f74859fa18029f99030530c4090c5 (patch)
treeed882703b7791501dea24af6fa2e5d391c9a7b83 /src/main
parent31cb1e6df5ba1db15090209113275c03433d0532 (diff)
downloadbukkit-f0ab5b0aec4f74859fa18029f99030530c4090c5.tar
bukkit-f0ab5b0aec4f74859fa18029f99030530c4090c5.tar.gz
bukkit-f0ab5b0aec4f74859fa18029f99030530c4090c5.tar.lz
bukkit-f0ab5b0aec4f74859fa18029f99030530c4090c5.tar.xz
bukkit-f0ab5b0aec4f74859fa18029f99030530c4090c5.zip
Rename Fish to FishHook. Fixes BUKKIT-3856
"Fish" is a badly named class to represent a fishing hook due to the possibility (or lack of) that Minecraft may be getting fish entities. This commit provides potential future compatibility by deprecating the existing Fish class and moving the methods to a new class: FishHook.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/bukkit/entity/Fish.java25
-rw-r--r--src/main/java/org/bukkit/entity/FishHook.java28
2 files changed, 30 insertions, 23 deletions
diff --git a/src/main/java/org/bukkit/entity/Fish.java b/src/main/java/org/bukkit/entity/Fish.java
index 9ecc4a33..12ed1ed7 100644
--- a/src/main/java/org/bukkit/entity/Fish.java
+++ b/src/main/java/org/bukkit/entity/Fish.java
@@ -2,28 +2,7 @@ package org.bukkit.entity;
/**
* Represents a fishing hook.
+ * @deprecated in favor of {@link FishHook}
*/
-public interface Fish extends Projectile {
-
- /**
- * Gets the chance of a fish biting.
- * <p>
- * 0.0 = No Chance.<br>
- * 1.0 = Instant catch.
- *
- * @return chance the bite chance
- */
- public double getBiteChance();
-
- /**
- * Sets the chance of a fish biting.
- * <p>
- * 0.0 = No Chance.<br>
- * 1.0 = Instant catch.
- *
- * @param chance the bite chance
- * @throws IllegalArgumentException if the bite chance is not between 0
- * and 1
- */
- public void setBiteChance(double chance) throws IllegalArgumentException;
+public interface Fish extends FishHook {
}
diff --git a/src/main/java/org/bukkit/entity/FishHook.java b/src/main/java/org/bukkit/entity/FishHook.java
new file mode 100644
index 00000000..45b7f03d
--- /dev/null
+++ b/src/main/java/org/bukkit/entity/FishHook.java
@@ -0,0 +1,28 @@
+package org.bukkit.entity;
+
+/**
+ * Represents a fishing hook.
+ */
+public interface FishHook extends Projectile {
+ /**
+ * Gets the chance of a fish biting.
+ * <p>
+ * 0.0 = No Chance.<br>
+ * 1.0 = Instant catch.
+ *
+ * @return chance the bite chance
+ */
+ public double getBiteChance();
+
+ /**
+ * Sets the chance of a fish biting.
+ * <p>
+ * 0.0 = No Chance.<br>
+ * 1.0 = Instant catch.
+ *
+ * @param chance the bite chance
+ * @throws IllegalArgumentException if the bite chance is not between 0
+ * and 1
+ */
+ public void setBiteChance(double chance) throws IllegalArgumentException;
+}