SteamWar/BauSystem2.0
Archiviert
12
0

Fix UnsignCommand
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Chaoscaot <chaoscaot@zohomail.eu>
Dieser Commit ist enthalten in:
Chaoscaot 2023-05-21 13:45:07 +02:00
Ursprung dd69f7ba83
Commit bf2e1c694d
2 geänderte Dateien mit 5 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -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);
}
}

Datei anzeigen

@ -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);
}
}