summaryrefslogtreecommitdiffstats
path: root/nms-patches/ItemFishingRod.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/ItemFishingRod.patch')
-rw-r--r--nms-patches/ItemFishingRod.patch12
1 files changed, 9 insertions, 3 deletions
diff --git a/nms-patches/ItemFishingRod.patch b/nms-patches/ItemFishingRod.patch
index 0c8cee22..fb2f9fbd 100644
--- a/nms-patches/ItemFishingRod.patch
+++ b/nms-patches/ItemFishingRod.patch
@@ -8,14 +8,19 @@
public class ItemFishingRod extends Item {
public ItemFishingRod() {
-@@ -19,9 +21,18 @@
+@@ -19,7 +21,6 @@
itemstack.damage(i, entityhuman);
entityhuman.a(enumhand);
} else {
- world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.I, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemFishingRod.j.nextFloat() * 0.4F + 0.8F));
if (!world.isClientSide) {
-+ // CraftBukkit start
EntityFishingHook entityfishinghook = new EntityFishingHook(world, entityhuman);
+ int j = EnchantmentManager.c(itemstack);
+@@ -34,6 +35,17 @@
+ entityfishinghook.b(k);
+ }
+
++ // CraftBukkit start
+ PlayerFishEvent playerFishEvent = new PlayerFishEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), null, (org.bukkit.entity.Fish) entityfishinghook.getBukkitEntity(), PlayerFishEvent.State.FISHING);
+ world.getServer().getPluginManager().callEvent(playerFishEvent);
+
@@ -25,6 +30,7 @@
+ }
+ world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.I, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemFishingRod.j.nextFloat() * 0.4F + 0.8F));
+ // CraftBukkit end
-
++
world.addEntity(entityfishinghook);
}
+