mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-24 09:59:42 -05:00
Fixed no command found being sent to the command sender for command handlers which return failure (false)
By: stevenh <steven.hartland@multiplay.co.uk>
This commit is contained in:
1 parent
9469bb110d
commit
e96e0e657f
2 files changed
+6
-2
No files matched your search
@@ -124,12 +124,16 @@ public final class SimpleCommandMap implements CommandMap {
|
||||
}
|
||||
|
||||
try {
|
||||
return target.execute(sender, sentCommandLabel, Arrays_copyOfRange(args, 1, args.length));
|
||||
// Note: we don't return the result of target.execute as thats success / failure, we return handled (true) or not handled (false)
|
||||
target.execute(sender, sentCommandLabel, Arrays_copyOfRange(args, 1, args.length));
|
||||
} catch (CommandException ex) {
|
||||
throw ex;
|
||||
} catch (Throwable ex) {
|
||||
throw new CommandException("Unhandled exception executing '" + commandLine + "' in " + target, ex);
|
||||
}
|
||||
|
||||
// return true as command was handled
|
||||
return true;
|
||||
}
|
||||
|
||||
public synchronized void clearCommands() {
|
||||
|
||||
Reference in new issue
Block a user