diff options
| author | LMBishop <13875753+LMBishop@users.noreply.github.com> | 2019-12-26 14:52:11 +0000 |
|---|---|---|
| committer | LMBishop <13875753+LMBishop@users.noreply.github.com> | 2019-12-26 14:52:11 +0000 |
| commit | 37d2aad0b1628d7506676de2936e43e7ac5ad908 (patch) | |
| tree | 1e300662b63a44612e65cda34a1304a11638efa7 /src | |
| parent | 51a47792f3584bda077e69639b78c0f49169bf4c (diff) | |
Fishing task type properly detects if a fish was caught
- Closes #54, #58
Diffstat (limited to 'src')
| -rw-r--r-- | src/main/java/com/leonardobishop/quests/quests/tasktypes/types/FishingTaskType.java | 10 |
1 files changed, 5 insertions, 5 deletions
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(); |
