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:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user