mirror of
https://github.com/Xiao-MoMi/Custom-Fishing.git
synced 2025-12-19 15:09:24 +00:00
Merge pull request #64 from synkc/feature/failure-event
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_Z, hook.getLocation().getBlockZ());
|
||||
|
||||
FishingResultEvent event = new FishingResultEvent(context, FishingResultEvent.Result.FAILURE, hook, nextLoot);
|
||||
if (EventUtils.fireAndCheckCancel(event)) {
|
||||
return;
|
||||
}
|
||||
|
||||
gears.trigger(ActionTrigger.FAILURE, context);
|
||||
plugin.getEventManager().trigger(context, nextLoot.id(), MechanicType.LOOT, ActionTrigger.FAILURE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user