Fixed collecting stats applying even when a block cannot be broken

This commit is contained in:
Jules 2024-06-13 00:10:50 -07:00
parent e2c9074084
commit 2f70c86b7e

View File

@ -7,6 +7,7 @@ import org.bukkit.Location;
import org.bukkit.Particle;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.inventory.ItemStack;
import org.bukkit.potion.PotionEffect;
@ -17,7 +18,7 @@ import java.util.Random;
public class PlayerCollectStats implements Listener {
private static final Random random = new Random();
@EventHandler
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void a(CustomBlockMineEvent event) {
Player player = event.getPlayer();