From 79932d8306da58ca9cdf4b5b253da0c82b54ba27 Mon Sep 17 00:00:00 2001 From: Indyuce Date: Thu, 10 Nov 2022 16:52:13 +0100 Subject: [PATCH] Support for the fishing stat --- .../mmocore/listener/profession/FishingListener.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MMOCore-Dist/src/main/java/net/Indyuce/mmocore/listener/profession/FishingListener.java b/MMOCore-Dist/src/main/java/net/Indyuce/mmocore/listener/profession/FishingListener.java index ff3aa47b..4dadc341 100644 --- a/MMOCore-Dist/src/main/java/net/Indyuce/mmocore/listener/profession/FishingListener.java +++ b/MMOCore-Dist/src/main/java/net/Indyuce/mmocore/listener/profession/FishingListener.java @@ -9,10 +9,7 @@ import net.Indyuce.mmocore.api.util.MMOCoreUtils; import net.Indyuce.mmocore.loot.LootBuilder; import net.Indyuce.mmocore.loot.fishing.FishingDropItem; import net.Indyuce.mmocore.manager.profession.FishingManager.FishingDropTable; -import org.bukkit.Bukkit; -import org.bukkit.Location; -import org.bukkit.Material; -import org.bukkit.Particle; +import org.bukkit.*; import org.bukkit.entity.FishHook; import org.bukkit.entity.Item; import org.bukkit.entity.Player; @@ -183,6 +180,9 @@ public class FishingListener implements Listener { if (called.isCancelled()) return; + // Increase player statistic + player.incrementStatistic(Statistic.FISH_CAUGHT); + // Calculate yeet velocity Item item = hook.getWorld().dropItemNaturally(hook.getLocation(), collect); MMOCoreUtils.displayIndicator(location.add(0, 1.25, 0),