mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-06 04:46:40 +00:00
Added the ability to configure the schematic and CraftScript directories.
This commit is contained in:
@ -181,8 +181,8 @@ public class ClipboardCommands {
|
||||
LocalConfiguration config = we.getConfiguration();
|
||||
|
||||
String filename = args.getString(0).replace("\0", "") + ".schematic";
|
||||
File dir = new File(config.getWorkingDirectory(), "schematics");
|
||||
File f = new File(new File(config.getWorkingDirectory(), "schematics"), filename);
|
||||
File dir = we.getWorkingDirectoryFile(config.saveDir);
|
||||
File f = new File(dir, filename);
|
||||
|
||||
if (!filename.matches("^[A-Za-z0-9_\\- \\./\\\\'\\$@~!%\\^\\*\\(\\)\\[\\]\\+\\{\\},\\?]+$")) {
|
||||
player.printError("Valid characters: A-Z, a-z, 0-9, spaces, "
|
||||
@ -230,8 +230,8 @@ public class ClipboardCommands {
|
||||
return;
|
||||
}
|
||||
|
||||
File dir = new File(config.getWorkingDirectory(), "schematics");
|
||||
File f = new File(new File(config.getWorkingDirectory(), "schematics"), filename);
|
||||
File dir = we.getWorkingDirectoryFile(config.saveDir);
|
||||
File f = new File(dir, filename);
|
||||
|
||||
if (!dir.exists()) {
|
||||
if (!dir.mkdir()) {
|
||||
|
Reference in New Issue
Block a user