From 09bb9c18ca71d392943c3dfce7d65c0f76d30c00 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Fri, 1 Nov 2019 23:22:29 +0100 Subject: [PATCH] Update SchematicCommands.java --- .../java/com/sk89q/worldedit/command/SchematicCommands.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/SchematicCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/SchematicCommands.java index 5d3393a8b..9a0edeeed 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/SchematicCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/SchematicCommands.java @@ -585,12 +585,13 @@ public class SchematicCommands { boolean oldFirst, @Switch(name = 'n', desc = "Sort by date, newest first") boolean newFirst, - @ArgFlag(name = 'f', desc = "Restricts by format.") + @ArgFlag(name = 'f', desc = "Restricts by format.", def = "") String formatName, @Arg(name = "filter", desc = "Filter for schematics", def = "all") String filter, Arguments arguments ) throws WorldEditException { + if (formatName.isEmpty()) formatName = null; if (oldFirst && newFirst) { throw new StopExecutionException(TextComponent.of("Cannot sort by oldest and newest.")); }