23 package com.realtime.crossfire.jxclient.commands;
27 import org.jetbrains.annotations.NotNull;
57 public void execute(@NotNull
final String args) {
58 final CharSequence commands;
59 final boolean perCharacterBinding;
60 if (args.equals(
"-c")) {
61 perCharacterBinding =
true;
63 }
else if (args.startsWith(
"-c ")) {
64 perCharacterBinding =
true;
65 commands = args.substring(3).trim();
67 perCharacterBinding =
false;
71 if (commands.length() != 0) {
77 drawInfoError(
"Cannot use unbind -c since no character is logged in.");
87 final StringBuilder sb =
new StringBuilder();
88 sb.append(
"Unbinds a command from a key\n");
90 sb.append(
"Usage: unbind\n");
91 sb.append(
"Usage: unbind -c\n");
93 sb.append(
"Asks the user for a key, then de-associates the key from its bound command.\n");
94 sb.append(
"If the option -c is used, the key is unbound only from the current character. Otherwise the key is unbound from all characters on all Crossfire servers.\n");
95 sb.append(
"To abort an unbind command, press ESC.\n");
96 sb.append(
"Note: Bind a key: bind\n");