mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-11-16 17:16:11 +00:00
Don't double-check for symlinks while loading schematics.
Fixes WORLDEDIT-3310.
This commit is contained in:
parent
b4d574273d
commit
025591e6d9
@ -79,7 +79,8 @@ public class SchematicCommands {
|
||||
@Command(
|
||||
aliases = { "load" },
|
||||
usage = "[<format>] <filename>",
|
||||
desc = "Load a schematic into your clipboard"
|
||||
desc = "Load a schematic into your clipboard",
|
||||
min = 1, max = 2
|
||||
)
|
||||
@Deprecated
|
||||
@CommandPermissions({ "worldedit.clipboard.load", "worldedit.schematic.load" })
|
||||
@ -102,12 +103,6 @@ public class SchematicCommands {
|
||||
|
||||
Closer closer = Closer.create();
|
||||
try {
|
||||
String filePath = f.getCanonicalPath();
|
||||
String dirPath = dir.getCanonicalPath();
|
||||
|
||||
if (!filePath.substring(0, dirPath.length()).equals(dirPath)) {
|
||||
player.printError("Clipboard file could not read or it does not exist.");
|
||||
} else {
|
||||
FileInputStream fis = closer.register(new FileInputStream(f));
|
||||
BufferedInputStream bis = closer.register(new BufferedInputStream(fis));
|
||||
ClipboardReader reader = format.getReader(bis);
|
||||
@ -116,9 +111,8 @@ public class SchematicCommands {
|
||||
Clipboard clipboard = reader.read(player.getWorld().getWorldData());
|
||||
session.setClipboard(new ClipboardHolder(clipboard, worldData));
|
||||
|
||||
log.info(player.getName() + " loaded " + filePath);
|
||||
log.info(player.getName() + " loaded " + f.getCanonicalPath());
|
||||
player.print(filename + " loaded. Paste it with //paste");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
player.printError("Schematic could not read or it does not exist: " + e.getMessage());
|
||||
log.log(Level.WARNING, "Failed to load a saved clipboard", e);
|
||||
@ -133,7 +127,8 @@ public class SchematicCommands {
|
||||
@Command(
|
||||
aliases = { "save" },
|
||||
usage = "[<format>] <filename>",
|
||||
desc = "Save a schematic into your clipboard"
|
||||
desc = "Save a schematic into your clipboard",
|
||||
min = 1, max = 2
|
||||
)
|
||||
@Deprecated
|
||||
@CommandPermissions({ "worldedit.clipboard.save", "worldedit.schematic.save" })
|
||||
|
Loading…
Reference in New Issue
Block a user