Skip to content
Permalink
Browse files

Include the entire formats list

  • Loading branch information...
me4502 committed Aug 6, 2019
1 parent 9d287ec commit 909c250711452cf9f7eba2709332ff25243f5ea8
Showing with 5 additions and 2 deletions.
  1. +5 −2 worldedit-cli/src/main/java/com/sk89q/worldedit/cli/CLIWorldEdit.java
@@ -159,6 +159,7 @@ public void onInitialized() {
}
}

this.commandSender = new CLICommandSender(this, LOGGER);
this.platform = new CLIPlatform(this);
LOGGER.info("WorldEdit CLI (version " + getInternalVersion() + ") is loaded");
}
@@ -171,7 +172,6 @@ public void onStarted() {

config = new CLIConfiguration(this);
config.load();
commandSender = new CLICommandSender(this, LOGGER);

WorldEdit.getInstance().getEventBus().post(new PlatformReadyEvent());
}
@@ -269,7 +269,10 @@ public static void main(String[] args) {
String fileArg = cmd.getOptionValue('f');
File file;
if (fileArg == null) {
file = app.commandSender.openFileOpenDialog(new String[]{"schem", "dat"});
String[] formats = new String[ClipboardFormats.getFileExtensionArray().length + 1];
System.arraycopy(ClipboardFormats.getFileExtensionArray(), 0, formats, 0, ClipboardFormats.getFileExtensionArray().length);
formats[formats.length - 1] = "dat";
file = app.commandSender.openFileOpenDialog(formats);
} else {
file = new File(fileArg);
}

0 comments on commit 909c250

Please sign in to comment.
You can’t perform that action at this time.