Fixed a few bad javadoc imports

Dieser Commit ist enthalten in:
Matthew Miller 2018-10-24 16:33:04 +10:00
Ursprung 93a696455f
Commit 275a2fa887
2 geänderte Dateien mit 9 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -38,6 +38,8 @@ import com.sk89q.worldedit.extension.platform.Capability;
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;
@ -68,6 +70,7 @@ import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.Nullable;
import javax.script.ScriptException;
/**
@ -164,7 +167,7 @@ public class WorldEdit {
}
/**
* 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
@ -174,7 +177,7 @@ public class WorldEdit {
}
/**
* 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
@ -240,12 +243,12 @@ public class WorldEdit {
* @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 {

Datei anzeigen

@ -34,6 +34,7 @@ import com.sk89q.worldedit.entity.Player;
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;
@ -92,7 +93,7 @@ public class SchematicCommands {
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!");