Fixes #452
This commit is contained in:
parent
119a332d83
commit
400d0319ab
@ -70,6 +70,8 @@ public class Settings extends Config {
|
||||
public static final class PATHS {
|
||||
public String HISTORY = "history";
|
||||
public String CLIPBOARD = "clipboard";
|
||||
@Comment("Each player has their own sub directory for schematics")
|
||||
public boolean PER_PLAYER_SCHEMATICS = true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -265,7 +265,8 @@ public class BrushCommands {
|
||||
BBC.NO_PERM.send(player, "worldedit.schematic.load.other");
|
||||
return;
|
||||
}
|
||||
File dir = new File(this.worldEdit.getWorkingDirectoryFile(config.saveDir), player.getUniqueId() + File.separator + filename);
|
||||
File working = this.worldEdit.getWorkingDirectoryFile(config.saveDir);
|
||||
File dir = new File(working, (Settings.IMP.PATHS.PER_PLAYER_SCHEMATICS ? (player.getUniqueId().toString() + File.separator) : "") + filename);
|
||||
if (!dir.exists()) {
|
||||
if (!filename.contains("/") && !filename.contains("\\")) {
|
||||
dir = new File(this.worldEdit.getWorkingDirectoryFile(config.saveDir), filename);
|
||||
|
@ -119,7 +119,8 @@ public class SchematicCommands {
|
||||
BBC.NO_PERM.send(player, "worldedit.schematic.load.other");
|
||||
return;
|
||||
}
|
||||
File dir = new File(this.worldEdit.getWorkingDirectoryFile(config.saveDir), player.getUniqueId().toString());
|
||||
File working = this.worldEdit.getWorkingDirectoryFile(config.saveDir);
|
||||
File dir = Settings.IMP.PATHS.PER_PLAYER_SCHEMATICS ? new File(working, player.getUniqueId().toString()) : working;
|
||||
File f = this.worldEdit.getSafeSaveFile(player, dir, filename, format.getExtension(), format.getExtension());
|
||||
if (f.getName().replaceAll("." + format.getExtension(), "").isEmpty()) {
|
||||
File directory = f.getParentFile();
|
||||
@ -187,7 +188,8 @@ public class SchematicCommands {
|
||||
BBC.NO_PERM.send(player, "worldedit.schematic.save.other");
|
||||
return;
|
||||
}
|
||||
final File dir = new File(this.worldEdit.getWorkingDirectoryFile(config.saveDir), player.getUniqueId().toString());
|
||||
File working = this.worldEdit.getWorkingDirectoryFile(config.saveDir);
|
||||
File dir = Settings.IMP.PATHS.PER_PLAYER_SCHEMATICS ? new File(working, player.getUniqueId().toString()) : working;
|
||||
File f = this.worldEdit.getSafeSaveFile(player, dir, filename, format.getExtension(), format.getExtension());
|
||||
if (f.getName().replaceAll("." + format.getExtension(), "").isEmpty()) {
|
||||
File directory = f.getParentFile();
|
||||
|
Loading…
Reference in New Issue
Block a user