Skip to content

Commit

Permalink
Fixed a few bad javadoc imports
Browse files Browse the repository at this point in the history
  • Loading branch information
me4502 committed Oct 24, 2018
1 parent 93a6964 commit 275a2fa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
11 changes: 7 additions & 4 deletions worldedit-core/src/main/java/com/sk89q/worldedit/WorldEdit.java
Expand Up @@ -38,6 +38,8 @@
import com.sk89q.worldedit.extension.platform.Platform;
import com.sk89q.worldedit.extension.platform.PlatformManager;
import com.sk89q.worldedit.extent.inventory.BlockBag;
import com.sk89q.worldedit.function.mask.Mask;
import com.sk89q.worldedit.function.pattern.Pattern;
import com.sk89q.worldedit.scripting.CraftScriptContext;
import com.sk89q.worldedit.scripting.CraftScriptEngine;
import com.sk89q.worldedit.scripting.RhinoCraftScriptEngine;
Expand Down Expand Up @@ -68,6 +70,7 @@
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.annotation.Nullable;
import javax.script.ScriptException;

/**
Expand Down Expand Up @@ -164,7 +167,7 @@ public ItemFactory getItemFactory() {
}

/**
* Get the mask factory from which new {@link com.sk89q.worldedit.function.mask.Mask}s
* Get the mask factory from which new {@link Mask}s
* can be constructed.
*
* @return the mask factory
Expand All @@ -174,7 +177,7 @@ public MaskFactory getMaskFactory() {
}

/**
* Get the pattern factory from which new {@link com.sk89q.worldedit.function.pattern.Pattern}s
* Get the pattern factory from which new {@link Pattern}s
* can be constructed.
*
* @return the pattern factory
Expand Down Expand Up @@ -240,12 +243,12 @@ public File getSafeOpenFile(Player player, File dir, String filename, String def
* @return a file
* @throws FilenameException thrown if the filename is invalid
*/
private File getSafeFile(Player player, File dir, String filename, String defaultExt, String[] extensions, boolean isSave) throws FilenameException {
private File getSafeFile(@Nullable Player player, File dir, String filename, String defaultExt, String[] extensions, boolean isSave) throws FilenameException {
if (extensions != null && (extensions.length == 1 && extensions[0] == null)) extensions = null;

File f;

if (filename.equals("#")) {
if (filename.equals("#") && player != null) {
if (isSave) {
f = player.openFileSaveDialog(extensions);
} else {
Expand Down
Expand Up @@ -34,6 +34,7 @@
import com.sk89q.worldedit.extension.platform.Actor;
import com.sk89q.worldedit.extent.clipboard.BlockArrayClipboard;
import com.sk89q.worldedit.extent.clipboard.Clipboard;
import com.sk89q.worldedit.extent.clipboard.io.BuiltInClipboardFormat;
import com.sk89q.worldedit.extent.clipboard.io.ClipboardFormat;
import com.sk89q.worldedit.extent.clipboard.io.ClipboardFormats;
import com.sk89q.worldedit.extent.clipboard.io.ClipboardReader;
Expand Down Expand Up @@ -92,7 +93,7 @@ public void load(Player player, LocalSession session, @Optional("sponge") String
LocalConfiguration config = worldEdit.getConfiguration();

File dir = worldEdit.getWorkingDirectoryFile(config.saveDir);
File f = worldEdit.getSafeOpenFile(player, dir, filename, "schematic", ClipboardFormats.getFileExtensionArray());
File f = worldEdit.getSafeOpenFile(player, dir, filename, BuiltInClipboardFormat.SPONGE_SCHEMATIC.getPrimaryFileExtension(), ClipboardFormats.getFileExtensionArray());

if (!f.exists()) {
player.printError("Schematic " + filename + " does not exist!");
Expand Down

0 comments on commit 275a2fa

Please sign in to comment.