From d0f97430aea076cd479bdf223e38da1e373da51b Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sun, 26 Jul 2020 08:44:46 +0200 Subject: [PATCH] Fix Redstone and Piston item Signed-off-by: Lixfel --- .../fightsystem/listener/InFightInventoryListener.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/listener/InFightInventoryListener.java b/FightSystem_Main/src/de/steamwar/fightsystem/listener/InFightInventoryListener.java index 531b2e5..dff7aa2 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/listener/InFightInventoryListener.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/listener/InFightInventoryListener.java @@ -73,6 +73,14 @@ public class InFightInventoryListener extends BasicListener { Inventory inventory = event.getPlayer().getInventory(); Material type = event.getBlock().getType(); + switch(type){ + case REDSTONE_WIRE: + type = Material.REDSTONE; + break; + case PISTON_HEAD: + type = Material.PISTON; + break; + } ItemStack itemStack; for (int i = 0; i <= 35; i++) { //35 is the last normal inventory slot