Skip to content
Permalink
Browse files

Arrays.copyOf

  • Loading branch information...
me4502 committed Aug 6, 2019
1 parent 2ceadfa commit b58a3a6c2bbd2109781b62044f376065083542f1
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 b58a3a6

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