Signed-off-by: Chaoscaot <chaoscaot@zohomail.eu>
Dieser Commit ist enthalten in:
Ursprung
dd69f7ba83
Commit
bf2e1c694d
@ -37,7 +37,8 @@ public class UnsignCommand extends SWCommand {
|
|||||||
public void unsignCommand(Player p) {
|
public void unsignCommand(Player p) {
|
||||||
ItemStack itemStack = p.getInventory().getItemInMainHand();
|
ItemStack itemStack = p.getInventory().getItemInMainHand();
|
||||||
if (FlatteningWrapper.impl.isNoBook(itemStack)) return;
|
if (FlatteningWrapper.impl.isNoBook(itemStack)) return;
|
||||||
itemStack.setType(Material.WRITABLE_BOOK);
|
ItemStack clone = new ItemStack(Material.WRITABLE_BOOK);
|
||||||
p.getInventory().setItemInMainHand(itemStack);
|
clone.setItemMeta(itemStack.getItemMeta());
|
||||||
|
p.getInventory().setItemInMainHand(clone);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,10 +44,10 @@ public class HotkeyListener implements PluginMessageListener, Plain {
|
|||||||
if (!(key >= 'A' && key <= 'Z' || key >= '0' && key <= '9')) return;
|
if (!(key >= 'A' && key <= 'Z' || key >= '0' && key <= '9')) return;
|
||||||
if (message.length >= 9) {
|
if (message.length >= 9) {
|
||||||
int mods = (message[5] & 0xFF) << 24 | (message[6] & 0xFF) << 16 | (message[7] & 0xFF) << 8 | (message[8] & 0xFF);
|
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);
|
ScriptRunner.callHotkey(mods, key, player, action == 1);
|
||||||
} else {
|
} else {
|
||||||
player.sendMessage("Hotkey: " + (char) key + " " + action);
|
// player.sendMessage("Hotkey: " + (char) key + " " + action);
|
||||||
ScriptRunner.callHotkey(0, key, player, action == 1);
|
ScriptRunner.callHotkey(0, key, player, action == 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren