From af87505532cb67d3a2395c67672ee0840f1ed5dd Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Thu, 25 Mar 2021 13:47:53 +0100 Subject: [PATCH] Add Offhand --- BauSystem_Main/src/de/steamwar/bausystem/world/Detonator.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/world/Detonator.java b/BauSystem_Main/src/de/steamwar/bausystem/world/Detonator.java index fe445c3..36dd6e9 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/world/Detonator.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/world/Detonator.java @@ -131,6 +131,10 @@ public class Detonator implements Listener { return player.getInventory().getItemInMainHand(); } + if(player.getInventory().getItemInOffHand().getItemMeta() != null && player.getInventory().getItemInOffHand().getItemMeta().getPersistentDataContainer().has(new NamespacedKey(BauSystem.getPlugin(), "deto"), PersistentDataType.BYTE)) { + return player.getInventory().getItemInOffHand(); + } + for (ItemStack item : player.getInventory().getContents()) { if(item == null) continue;