mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-11-16 17:16:11 +00:00
Updated the .schematic save routine to also create directories as required.
This commit is contained in:
parent
414c3cf33d
commit
48aeb58bbb
@ -501,6 +501,12 @@ public class WorldEdit extends Plugin {
|
||||
if (!filePath.substring(0, dirPath.length()).equals(dirPath)) {
|
||||
player.sendMessage(Colors.Rose + "Invalid path for Schematic.");
|
||||
} else {
|
||||
// Create parent directories
|
||||
File parent = f.getParentFile();
|
||||
if (parent != null && !parent.exists()) {
|
||||
parent.mkdirs();
|
||||
}
|
||||
|
||||
session.getClipboard().saveSchematic(filePath);
|
||||
logger.log(Level.INFO, player.getName() + " saved " + filePath);
|
||||
player.sendMessage(Colors.LightPurple + filename + " saved.");
|
||||
|
Loading…
Reference in New Issue
Block a user