From a45ebaad2fbed94dae430a58a5cbddf7d85ea148 Mon Sep 17 00:00:00 2001 From: masmc05 <63639746+masmc05@users.noreply.github.com> Date: Mon, 30 Sep 2024 00:04:42 +0300 Subject: [PATCH] Respect cancelled drops when applying block luck (#308) --- .../dev/aurelium/auraskills/bukkit/source/BlockLeveler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/source/BlockLeveler.java b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/source/BlockLeveler.java index 8762eee31..1e58216ad 100644 --- a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/source/BlockLeveler.java +++ b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/source/BlockLeveler.java @@ -49,7 +49,7 @@ public void onBreak(BlockBreakEvent event) { Player player = event.getPlayer(); Block block = event.getBlock(); - handleBreak(player, block, event, trait -> trait.getUniqueDrops(block, player)); + handleBreak(player, block, event, trait -> event.isDropItems() ? trait.getUniqueDrops(block, player) : Collections.emptySet()); } public void handleBreak(Player player, Block block, Cancellable event, Function> dropFunction) {