From 37d2aad0b1628d7506676de2936e43e7ac5ad908 Mon Sep 17 00:00:00 2001 From: LMBishop <13875753+LMBishop@users.noreply.github.com> Date: Thu, 26 Dec 2019 14:52:11 +0000 Subject: Fishing task type properly detects if a fish was caught - Closes #54, #58 --- .../quests/quests/tasktypes/types/FishingTaskType.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/leonardobishop/quests/quests/tasktypes/types/FishingTaskType.java b/src/main/java/com/leonardobishop/quests/quests/tasktypes/types/FishingTaskType.java index 96840e2f..0c04a98a 100644 --- a/src/main/java/com/leonardobishop/quests/quests/tasktypes/types/FishingTaskType.java +++ b/src/main/java/com/leonardobishop/quests/quests/tasktypes/types/FishingTaskType.java @@ -35,14 +35,14 @@ public final class FishingTaskType extends TaskType { @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onFishCaught(PlayerFishEvent event) { - if (event.getState() == PlayerFishEvent.State.CAUGHT_FISH) { + if (event.getState() != PlayerFishEvent.State.CAUGHT_FISH) { return; } - Location hookLocation = event.getHook().getLocation().add(0, -1, 0); - if (!(hookLocation.getBlock().getType() == Material.WATER)) { - return; - } +// Location hookLocation = event.getHook().getLocation().add(0, -1, 0); +// if (!(hookLocation.getBlock().getType() == Material.WATER)) { +// return; +// } Player player = event.getPlayer(); -- cgit v1.2.3-70-g09d2