mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-15 07:01:36 +08:00
19972e09b8
5a0150f586ed3eb15fe6f1f596d1a5a7d806f0f9 Fix ITEM_BREAK e6a3911057bd94d8bd7021cbb4923fb84fb106d1 Upstream merge d1cdcf8d4c3639f956474f02ed662517cffbe23e Remove old patch 068df64aeee368377e1673667bffc7a6dcf90554 Rebuild all patches
27 lines
1.2 KiB
Diff
27 lines
1.2 KiB
Diff
From dd287f8fcf8890ca9fcb4d6f63910f6796598a55 Mon Sep 17 00:00:00 2001
|
|
From: "gjmcferrin@gmail.com" <gjmcferrin@gmail.com>
|
|
Date: Mon, 10 Feb 2014 10:05:11 -0500
|
|
Subject: [PATCH] Properly cancel fishing event. Fixes BUKKIT-5396
|
|
|
|
Previously, when cancelling a PlayerFishEvent with State.FISHING, the next
|
|
fishing attempt would automatically result in a new PlayerFishEvent with
|
|
State.FAILED_ATTEMPT because the player's hooked entity was not properly
|
|
cleared. This ensures that the player's hooked entity value is set to null so
|
|
that the next attempt will result in the proper state being called.
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/ItemFishingRod.java b/src/main/java/net/minecraft/server/ItemFishingRod.java
|
|
index 423a776..c14d261 100644
|
|
--- a/src/main/java/net/minecraft/server/ItemFishingRod.java
|
|
+++ b/src/main/java/net/minecraft/server/ItemFishingRod.java
|
|
@@ -23,6 +23,7 @@ public class ItemFishingRod extends Item {
|
|
world.getServer().getPluginManager().callEvent(playerFishEvent);
|
|
|
|
if (playerFishEvent.isCancelled()) {
|
|
+ entityhuman.hookedFish = null;
|
|
return itemstack;
|
|
}
|
|
// CraftBukkit end
|
|
--
|
|
2.1.0
|
|
|