9
0
mirror of https://github.com/Xiao-MoMi/Custom-Fishing.git synced 2026-01-06 15:51:50 +00:00

Update CraftEngine compatibility

This commit is contained in:
XiaoMoMi
2025-02-15 15:56:43 +08:00
parent 4a7182fa31
commit 3c555a1cdf
10 changed files with 23 additions and 11 deletions

View File

@@ -79,6 +79,7 @@ public class FishingHookStateEvent extends PlayerEvent {
BITE,
ESCAPE,
LURE,
LAND
LAND,
HOOK
}
}

View File

@@ -19,6 +19,7 @@ package net.momirealms.customfishing.api.mechanic.fishing;
import net.momirealms.customfishing.api.BukkitCustomFishingPlugin;
import net.momirealms.customfishing.api.event.FishingEffectApplyEvent;
import net.momirealms.customfishing.api.event.FishingHookStateEvent;
import net.momirealms.customfishing.api.event.FishingLootSpawnEvent;
import net.momirealms.customfishing.api.event.FishingResultEvent;
import net.momirealms.customfishing.api.mechanic.MechanicType;
@@ -383,6 +384,7 @@ public class CustomFishingHook {
gears.trigger(ActionTrigger.REEL, context);
destroy();
} else {
EventUtils.fireAndForget(new FishingHookStateEvent(context.holder(), hook, FishingHookStateEvent.State.HOOK));
if (nextLoot.disableGame() || RequirementManager.isSatisfied(context, ConfigManager.skipGameRequirements())) {
handleSuccessfulFishing();
destroy();
@@ -398,7 +400,6 @@ public class CustomFishingHook {
}
}
/**
* Handles the bite action.
*/