Skip to content

Commit

Permalink
Provide a temporary workaround for CommandExceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkArc committed Jan 11, 2020
1 parent beec307 commit 639bbef
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -200,6 +200,12 @@ public void handleCommand(CommandSender sender, String arguments) {
.build()); .build());
} }
} catch (CommandExecutionException e) { } catch (CommandExecutionException e) {
// FIXME: Put this in an exception converter.
if (e.getCause() instanceof com.sk89q.minecraft.util.commands.CommandException) {
actor.print(TextComponent.builder(e.getCause().getMessage()).color(TextColor.RED).build());
return;
}

handleUnknownException(actor, e.getCause()); handleUnknownException(actor, e.getCause());
} catch (CommandException e) { } catch (CommandException e) {
actor.print(TextComponent.builder("") actor.print(TextComponent.builder("")
Expand Down

0 comments on commit 639bbef

Please sign in to comment.