Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-09-06 16:12:51 +02:00
Updated the .schematic save routine to also create directories as required.
Dieser Commit ist enthalten in:
Ursprung
414c3cf33d
Commit
48aeb58bbb
@ -501,6 +501,12 @@ public class WorldEdit extends Plugin {
|
|||||||
if (!filePath.substring(0, dirPath.length()).equals(dirPath)) {
|
if (!filePath.substring(0, dirPath.length()).equals(dirPath)) {
|
||||||
player.sendMessage(Colors.Rose + "Invalid path for Schematic.");
|
player.sendMessage(Colors.Rose + "Invalid path for Schematic.");
|
||||||
} else {
|
} else {
|
||||||
|
// Create parent directories
|
||||||
|
File parent = f.getParentFile();
|
||||||
|
if (parent != null && !parent.exists()) {
|
||||||
|
parent.mkdirs();
|
||||||
|
}
|
||||||
|
|
||||||
session.getClipboard().saveSchematic(filePath);
|
session.getClipboard().saveSchematic(filePath);
|
||||||
logger.log(Level.INFO, player.getName() + " saved " + filePath);
|
logger.log(Level.INFO, player.getName() + " saved " + filePath);
|
||||||
player.sendMessage(Colors.LightPurple + filename + " saved.");
|
player.sendMessage(Colors.LightPurple + filename + " saved.");
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren