From 868554367a02d4f29e37e881a9cf4507fae919f2 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Sun, 17 Nov 2019 18:20:00 +0000 Subject: [PATCH] Fix schem load legacy --- .../java/com/sk89q/worldedit/command/SchematicCommands.java | 4 ++-- .../java/com/sk89q/worldedit/command/UtilityCommands.java | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) 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 56f97a6bb..c962d3d36 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 @@ -211,11 +211,11 @@ public class SchematicCommands { public void load(Actor actor, LocalSession session, @Arg(desc = "File name.") String filename, - @Arg(desc = "Format name.", def = "sponge") + @Arg(desc = "Format name.", def = "") String formatName) throws FilenameException { LocalConfiguration config = worldEdit.getConfiguration(); - ClipboardFormat format = ClipboardFormats.findByAlias(formatName); + ClipboardFormat format = formatName != null ? ClipboardFormats.findByAlias(formatName) : null; InputStream in = null; try { URI uri; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java index a4e7d0d1e..5314787ab 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java @@ -805,7 +805,7 @@ public class UtilityCommands { boolean listGlobal = !Settings.IMP.PATHS.PER_PLAYER_SCHEMATICS; if (len > 0) { for (int i = 0; i < len; i++) { - String arg = ""; + String arg = args.get(i); switch (arg.toLowerCase()) { case "me": case "mine": @@ -890,7 +890,8 @@ public class UtilityCommands { UUID.fromString(f.getName()); return; } - } catch (IllegalArgumentException ignored) {} + } catch (IllegalArgumentException ignored) { + } super.accept(f); } };