From 11b4390e96f13d2f77c84f2e14fd1dc52ebf4e26 Mon Sep 17 00:00:00 2001 From: XiaoMoMi Date: Sat, 31 May 2025 18:20:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=A0=E7=89=A9=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../net/momirealms/craftengine/bukkit/util/InteractUtils.java | 1 + 1 file changed, 1 insertion(+) diff --git a/bukkit/src/main/java/net/momirealms/craftengine/bukkit/util/InteractUtils.java b/bukkit/src/main/java/net/momirealms/craftengine/bukkit/util/InteractUtils.java index bbcb6eb2b..32319db3d 100644 --- a/bukkit/src/main/java/net/momirealms/craftengine/bukkit/util/InteractUtils.java +++ b/bukkit/src/main/java/net/momirealms/craftengine/bukkit/util/InteractUtils.java @@ -297,6 +297,7 @@ public class InteractUtils { } public static boolean willConsume(Player player, BlockData state, BlockHitResult hit, Item item) { + if (item == null) return false; Key blockType = BlockStateUtils.getBlockOwnerIdFromData(state); if (WILL_CONSUME.containsKey(blockType)) { return WILL_CONSUME.get(blockType).apply(player, item, state, hit);