diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/UnsignCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/UnsignCommand.java index 37dda16d..c1a048cc 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/UnsignCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/UnsignCommand.java @@ -37,7 +37,8 @@ public class UnsignCommand extends SWCommand { public void unsignCommand(Player p) { ItemStack itemStack = p.getInventory().getItemInMainHand(); if (FlatteningWrapper.impl.isNoBook(itemStack)) return; - itemStack.setType(Material.WRITABLE_BOOK); - p.getInventory().setItemInMainHand(itemStack); + ItemStack clone = new ItemStack(Material.WRITABLE_BOOK); + clone.setItemMeta(itemStack.getItemMeta()); + p.getInventory().setItemInMainHand(clone); } } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/HotkeyListener.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/HotkeyListener.java index 68e9720a..d27a314e 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/HotkeyListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/HotkeyListener.java @@ -44,10 +44,10 @@ public class HotkeyListener implements PluginMessageListener, Plain { if (!(key >= 'A' && key <= 'Z' || key >= '0' && key <= '9')) return; if (message.length >= 9) { int mods = (message[5] & 0xFF) << 24 | (message[6] & 0xFF) << 16 | (message[7] & 0xFF) << 8 | (message[8] & 0xFF); - player.sendMessage("Hotkey: " + (char) key + " " + action + " " + Long.toBinaryString(mods)); + // player.sendMessage("Hotkey: " + (char) key + " " + action + " " + Long.toBinaryString(mods)); ScriptRunner.callHotkey(mods, key, player, action == 1); } else { - player.sendMessage("Hotkey: " + (char) key + " " + action); + // player.sendMessage("Hotkey: " + (char) key + " " + action); ScriptRunner.callHotkey(0, key, player, action == 1); } }