From 633112ffd1c02529e6ef21a90638ecb362f4c5d5 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Thu, 21 Jul 2022 17:25:07 +0200 Subject: [PATCH] Fix offhand remove item Signed-off-by: yoyosource --- .../bausystem/features/simulator/TNTSimulatorListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulatorListener.java b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulatorListener.java index 70591dc3..860bf56c 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulatorListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulatorListener.java @@ -98,7 +98,7 @@ public class TNTSimulatorListener implements Listener { if (ItemUtils.isItem(e.getPlayer().getInventory().getItemInMainHand(), "simulator")) { simulatorShowHide(e.getPlayer(), i -> null, PlayerInventory::getItemInMainHand, e.getTo()); TNTSimulator tntSimulator = SimulatorStorage.getSimulator(e.getPlayer().getInventory().getItemInOffHand()); - if (tntSimulator != null) SimulatorPreviewStorage.hide(e.getPlayer()); + if (tntSimulator == null) SimulatorPreviewStorage.hide(e.getPlayer()); } else { TNTSimulator tntSimulator = simulatorShowHide(e.getPlayer(), i -> null, PlayerInventory::getItemInOffHand, e.getTo()); if (tntSimulator != null) SimulatorPreviewStorage.show(e.getPlayer(), tntSimulator);