From b8ec4be95c3b6a3ffb2bc1e1241f019f02f923a1 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Tue, 21 Sep 2021 17:30:32 +0100 Subject: [PATCH] Revert "Slightly preferable messages on UsageException thrown by piston" This reverts commit e9adf0f30d8d29b938b7e4bbc1653c6013ef8500. --- .../extension/platform/PlatformCommandManager.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java index 23a777cd3..63e51617b 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java @@ -766,18 +766,13 @@ public final class PlatformCommandManager { actor.print(Caption.of("fawe.cancel.worldedit.cancel.reason", e.getComponent())); } catch (UsageException e) { ImmutableList cmd = e.getCommands(); - if (e.getRichMessage() == TextComponent.empty() && !cmd.isEmpty()) { + if (!cmd.isEmpty()) { actor.print(Caption.of( "fawe.error.command.syntax", HelpGenerator.create(e.getCommandParseResult()).getFullHelp() )); - } else { - actor.print(Caption.of( - "fawe.error.command.syntax", - HelpGenerator.create(e.getCommandParseResult()).getUsage() - )); - actor.printError(e.getRichMessage()); } + actor.printError(e.getRichMessage()); } catch (CommandExecutionException e) { handleUnknownException(actor, e.getCause()); } catch (CommandException e) {