more possible plugin compatibility?

This commit is contained in:
hyperdefined
2022-12-01 17:56:41 -05:00
parent 98a5f20a86
commit 2e0ee18594
4 changed files with 13 additions and 27 deletions

View File

@@ -47,7 +47,7 @@ public class PlayerFish implements Listener {
this.toolStats = toolStats;
}
@EventHandler(priority = EventPriority.HIGHEST)
@EventHandler(priority = EventPriority.MONITOR)
public void onFish(PlayerFishEvent event) {
if (event.isCancelled()) {
return;
@@ -86,8 +86,7 @@ public class PlayerFish implements Listener {
}
// update the fishing rod!
ItemStack finalFishingRod = fishingRod;
Bukkit.getScheduler().runTaskLater(toolStats, () -> updateFishCount(finalFishingRod), 1);
updateFishCount(fishingRod);
// check if the player caught an item
if (event.getCaught() == null) {