mirror of
https://github.com/hyperdefined/ToolStats.git
synced 2026-04-23 03:21:22 +00:00
make sure we check for canceled events
This commit is contained in:
@@ -46,11 +46,8 @@ public class PlayerFish implements Listener {
|
||||
this.toolStats = toolStats;
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onFish(PlayerFishEvent event) {
|
||||
if (event.isCancelled()) {
|
||||
return;
|
||||
}
|
||||
// only listen to when a player catches a fish
|
||||
if (event.getState() != PlayerFishEvent.State.CAUGHT_FISH) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user