Implemented -? and changed handling of InvalidUsageException.
Fixes WORLDEDIT-2947.
This commit is contained in:
@@ -145,7 +145,7 @@ public class CommandContext {
|
||||
suggestionContext = SuggestionContext.hangingValue();
|
||||
|
||||
// Not a flag?
|
||||
if (arg.charAt(0) != '-' || arg.length() == 1 || !arg.matches("^-[a-zA-Z]+$")) {
|
||||
if (arg.charAt(0) != '-' || arg.length() == 1 || !arg.matches("^-[a-zA-Z\\?]+$")) {
|
||||
if (!isHanging) {
|
||||
suggestionContext = SuggestionContext.lastValue();
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public class CommandException extends Exception {
|
||||
}
|
||||
builder.append(spacedSuffix);
|
||||
}
|
||||
return builder.toString();
|
||||
return builder.toString().trim();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user