9
0
mirror of https://github.com/Xiao-MoMi/Custom-Fishing.git synced 2025-12-19 15:09:24 +00:00

Add missing FishingResultEvent

This commit is contained in:
inyong
2025-09-26 13:37:41 +09:00
parent f1165cfafe
commit 66e0131aad

View File

@@ -464,6 +464,11 @@ public class CustomFishingHook {
context.arg(ContextKeys.OTHER_Y, hook.getLocation().getBlockY()); context.arg(ContextKeys.OTHER_Y, hook.getLocation().getBlockY());
context.arg(ContextKeys.OTHER_Z, hook.getLocation().getBlockZ()); context.arg(ContextKeys.OTHER_Z, hook.getLocation().getBlockZ());
FishingResultEvent event = new FishingResultEvent(context, FishingResultEvent.Result.FAILURE, hook, nextLoot);
if (EventUtils.fireAndCheckCancel(event)) {
return;
}
gears.trigger(ActionTrigger.FAILURE, context); gears.trigger(ActionTrigger.FAILURE, context);
plugin.getEventManager().trigger(context, nextLoot.id(), MechanicType.LOOT, ActionTrigger.FAILURE); plugin.getEventManager().trigger(context, nextLoot.id(), MechanicType.LOOT, ActionTrigger.FAILURE);
} }