summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityFishingHook.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/EntityFishingHook.patch')
-rw-r--r--nms-patches/EntityFishingHook.patch10
1 files changed, 5 insertions, 5 deletions
diff --git a/nms-patches/EntityFishingHook.patch b/nms-patches/EntityFishingHook.patch
index 4fabdd73..e993146c 100644
--- a/nms-patches/EntityFishingHook.patch
+++ b/nms-patches/EntityFishingHook.patch
@@ -22,9 +22,9 @@
this.hooked = movingobjectposition.entity;
this.getDataWatcher().set(EntityFishingHook.c, Integer.valueOf(this.hooked.getId() + 1));
@@ -266,6 +273,10 @@
- if (this.au <= 0) {
- this.av = 0;
+ if (this.av <= 0) {
this.aw = 0;
+ this.ax = 0;
+ // CraftBukkit start
+ PlayerFishEvent playerFishEvent = new PlayerFishEvent((Player) this.owner.getBukkitEntity(), null, (Fish) this.getBukkitEntity(), PlayerFishEvent.State.FAILED_ATTEMPT);
+ this.world.getServer().getPluginManager().callEvent(playerFishEvent);
@@ -33,9 +33,9 @@
} else {
double d10;
@@ -278,6 +289,13 @@
- if (this.aw > 0) {
- this.aw -= l;
- if (this.aw <= 0) {
+ if (this.ax > 0) {
+ this.ax -= l;
+ if (this.ax <= 0) {
+ // CraftBukkit start
+ PlayerFishEvent playerFishEvent = new PlayerFishEvent((Player) this.owner.getBukkitEntity(), null, (Fish) this.getBukkitEntity(), PlayerFishEvent.State.BITE);
+ this.world.getServer().getPluginManager().callEvent(playerFishEvent);