13
0
geforkt von Mirrors/Velocity

Lie about command invocation succeeding if there is a syntax error.

See https://github.com/VelocityPowered/Velocity/issues/337#issuecomment-665568793

This will need an API change to resolve, but it's late right now.
Dieser Commit ist enthalten in:
Andrew Steinborn 2020-07-29 06:20:16 -04:00
Ursprung b6a60b610a
Commit 4c5636e6f7

Datei anzeigen

@ -160,8 +160,11 @@ public class VelocityCommandManager implements CommandManager {
CommandSyntaxException.BUILT_IN_EXCEPTIONS.dispatcherUnknownCommand());
if (isSyntaxError) {
source.sendMessage(TextComponent.of(e.getMessage(), NamedTextColor.RED));
// This is, of course, a lie, but the API will need to change...
return true;
} else {
return false;
}
return false;
} catch (final Throwable e) {
// Ugly, ugly swallowing of everything Throwable, because plugins are naughty.
throw new RuntimeException("Unable to invoke command " + cmdLine + " for " + source, e);