From 89bd2c00256b612e5c54aa5093429e358504b0b4 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Wed, 2 May 2018 10:51:58 +1000 Subject: [PATCH] Suggest `//schem show all ` if no schems are found --- .../sk89q/worldedit/command/SchematicCommands.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/src/main/java/com/sk89q/worldedit/command/SchematicCommands.java b/core/src/main/java/com/sk89q/worldedit/command/SchematicCommands.java index f3ab2c1c..df03156c 100644 --- a/core/src/main/java/com/sk89q/worldedit/command/SchematicCommands.java +++ b/core/src/main/java/com/sk89q/worldedit/command/SchematicCommands.java @@ -516,6 +516,17 @@ public class SchematicCommands extends MethodCommands { } } }); + long total = count.longValue(); + if (total == 0) { + if (args.getJoinedStrings(0).toLowerCase().startsWith("all")) { + BBC.SCHEMATIC_NONE.send(player); + } else { + String joined = args.getJoinedStrings(0); + String cmd = "/" + Commands.getAlias(SchematicCommands.class, "schematic") + " " + getCommand().aliases()[0] + " all " + joined; + BBC.HELP_SUGGEST.send(player, joined, cmd); + } + return; + } visExtent.bind(); visExtent.update();