Skip to content
Permalink
Browse files

Arrays.copyOf

  • Loading branch information...
me4502 committed Aug 6, 2019
1 parent 909c250 commit 21f0e7333024653e840d4b165bb92c884379754d
Showing with 2 additions and 2 deletions.
  1. +2 −2 worldedit-cli/src/main/java/com/sk89q/worldedit/cli/CLIWorldEdit.java
@@ -57,6 +57,7 @@
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.util.Arrays;
import java.util.Map;
import java.util.Scanner;

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

0 comments on commit 21f0e73

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