From a3840504716ca30ad3230c7a43ce66b391ebed75 Mon Sep 17 00:00:00 2001 From: Nhan Le <28459250+nhanledev@users.noreply.github.com> Date: Wed, 16 Nov 2022 22:45:32 +0700 Subject: [PATCH] Fix Sculk block break does not drop EXP This is an issue as seen in https://github.com/Auxilor/EcoEnchants/issues/320, I think this would fix that bug. --- .../ecoenchants/enchants/impl/EnchantmentTelekinesis.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchants/impl/EnchantmentTelekinesis.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchants/impl/EnchantmentTelekinesis.kt index dfca89d7..d810a1a0 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchants/impl/EnchantmentTelekinesis.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchants/impl/EnchantmentTelekinesis.kt @@ -62,6 +62,10 @@ class EnchantmentTelekinesis( val player = event.player val block = event.block + if (!player.hasEnchantActive(enchant)) { + return + } + if (!AntigriefManager.canBreakBlock(player, block)) { return }