From e8f72d65214913c49f641975a4ccadab2d3ce2f0 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 24 Jan 2022 12:52:33 +0100 Subject: [PATCH] fix: Deduplicate error messages (#1557) Fixes https://github.com/IntellectualSites/FastAsyncWorldEdit/issues/1535 --- .../java/com/sk89q/worldedit/command/ChunkCommands.java | 2 -- .../extension/platform/PlatformCommandManager.java | 7 ------- 2 files changed, 9 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/ChunkCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/ChunkCommands.java index f65b94cfd..d1b9084fb 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/ChunkCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/ChunkCommands.java @@ -114,8 +114,6 @@ public class ChunkCommands { TextComponent.of(actor.getName()) ) ); - actor.print(new ChunkListPaginationBox(region).create(page)); - actor.print(Caption.of("worldedit.listchunks.listfor", TextComponent.of(actor.getName()))); } @Command( 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 0d8aba906..49a420544 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 @@ -769,13 +769,6 @@ public final class PlatformCommandManager { } catch (FaweException e) { actor.print(Caption.of("fawe.cancel.reason", e.getComponent())); } catch (UsageException e) { - ImmutableList cmd = e.getCommands(); - if (!cmd.isEmpty()) { - actor.print(Caption.of( - "fawe.error.command.syntax", - HelpGenerator.create(e.getCommandParseResult()).getFullHelp() - )); - } actor.printError(e.getRichMessage()); } catch (CommandExecutionException e) { handleUnknownException(actor, e.getCause());