diff --git a/BauSystem_15/src/de/steamwar/bausystem/commands/CommandDebugStick_15.java b/BauSystem_15/src/de/steamwar/bausystem/commands/CommandDebugStick_15.java index 88e5b3b..3c1d189 100644 --- a/BauSystem_15/src/de/steamwar/bausystem/commands/CommandDebugStick_15.java +++ b/BauSystem_15/src/de/steamwar/bausystem/commands/CommandDebugStick_15.java @@ -27,9 +27,6 @@ class CommandDebugStick_15 { private CommandDebugStick_15(){} static void giveStick(Player player){ - if(player.getInventory().getItemInMainHand().getType() == Material.AIR) - player.getInventory().setItemInMainHand(new ItemStack(Material.DEBUG_STICK)); - else - player.getInventory().addItem(new ItemStack(Material.DEBUG_STICK)); + player.getInventory().setItemInMainHand(new ItemStack(Material.DEBUG_STICK)); } } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandDetonator.java b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandDetonator.java index 4446023..52bc21e 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandDetonator.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandDetonator.java @@ -23,7 +23,6 @@ import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.world.Detonator; import de.steamwar.bausystem.world.Welt; -import org.bukkit.Material; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -63,10 +62,7 @@ public class CommandDetonator implements CommandExecutor { case "wand": case "detonator": case "item": - if(player.getInventory().getItemInMainHand().getType() == Material.AIR) - player.getInventory().setItemInMainHand(Detonator.WAND); - else - player.getInventory().addItem(Detonator.WAND); + player.getInventory().setItemInMainHand(Detonator.WAND); player.updateInventory(); Detonator.getDetonator(player); break; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandSkull.java b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandSkull.java index 9a0ca95..6ac0d81 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandSkull.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandSkull.java @@ -21,7 +21,6 @@ package de.steamwar.bausystem.commands; import de.steamwar.bausystem.BauSystem; import de.steamwar.inventory.SWItem; -import org.bukkit.Material; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -47,10 +46,7 @@ public class CommandSkull implements CommandExecutor { assert sm != null; sm.setDisplayName("§e" + args[0] + "§8s Kopf"); is.setItemMeta(sm); - if(p.getInventory().getItemInMainHand().getType() == Material.AIR) - p.getInventory().setItemInMainHand(is); - else - p.getInventory().addItem(is); + p.getInventory().setItemInMainHand(is); return false; }