13
0
Signed-off-by: yaruma3341 <yaruma3341@gmail.com>
Dieser Commit ist enthalten in:
Yaruma3341 2019-04-25 01:22:51 +02:00 committet von yaruma3341
Ursprung 14238f621c
Commit 6535e4f81e

Datei anzeigen

@ -78,6 +78,11 @@ public class SchematicCommand implements CommandExecutor {
try { try {
Actor actor = SchematicSystem.getWorldEditPlugin().wrapCommandSender(player); Actor actor = SchematicSystem.getWorldEditPlugin().wrapCommandSender(player);
File folder = new File(SchematicSystem.SCHEM_DIR + player.getUniqueId().toString() + "/");
if(!folder.exists()) {
player.sendMessage(SchematicSystem.PREFIX + "§cDie angegebene Schematic existiert nicht!");
return false;
}
File file; File file;
if(WarkingUser.get(schematic.getSchemOwner()).getUUID() != player.getUniqueId()) { if(WarkingUser.get(schematic.getSchemOwner()).getUUID() != player.getUniqueId()) {
@ -177,8 +182,17 @@ public class SchematicCommand implements CommandExecutor {
File folder = new File(SchematicSystem.SCHEM_DIR + player.getUniqueId().toString() + "/"); File folder = new File(SchematicSystem.SCHEM_DIR + player.getUniqueId().toString() + "/");
if(!folder.exists()) if(!folder.exists()) {
folder.mkdir(); folder.mkdir();
Files.setPosixFilePermissions(folder.toPath(),
EnumSet.of(PosixFilePermission.OWNER_READ,
PosixFilePermission.OWNER_WRITE,
PosixFilePermission.GROUP_READ,
PosixFilePermission.OTHERS_READ,
PosixFilePermission.OTHERS_WRITE,
PosixFilePermission.OWNER_EXECUTE,
PosixFilePermission.OTHERS_EXECUTE));
}
File file = new File(folder, args[1] + ".schematic"); File file = new File(folder, args[1] + ".schematic");
file.createNewFile(); file.createNewFile();