From 70958fac9ab2f29d665440417ff0cd850bd5ffb7 Mon Sep 17 00:00:00 2001 From: Yaruma3341 Date: Fri, 12 Jul 2019 20:33:16 +0200 Subject: [PATCH] bugfix Signed-off-by: yaruma3341 --- .../commands/SchematicCommand.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/de/warking/schematicsystem/commands/SchematicCommand.java b/src/de/warking/schematicsystem/commands/SchematicCommand.java index 4f0b692..db66425 100644 --- a/src/de/warking/schematicsystem/commands/SchematicCommand.java +++ b/src/de/warking/schematicsystem/commands/SchematicCommand.java @@ -217,12 +217,15 @@ public class SchematicCommand implements CommandExecutor { File file = new File(folder, args[1] + ".schematic"); file.createNewFile(); - Files.setPosixFilePermissions(file.toPath(), - EnumSet.of(PosixFilePermission.OWNER_READ, - PosixFilePermission.OWNER_WRITE, - PosixFilePermission.GROUP_READ, - PosixFilePermission.OTHERS_READ, - PosixFilePermission.OTHERS_WRITE)); + + try { + Files.setPosixFilePermissions(file.toPath(), + EnumSet.of(PosixFilePermission.OWNER_READ, + PosixFilePermission.OWNER_WRITE, + PosixFilePermission.GROUP_READ, + PosixFilePermission.OTHERS_READ, + PosixFilePermission.OTHERS_WRITE)); + } catch (Exception ex) { } ClipboardFormat.SCHEMATIC.getWriter(new FileOutputStream(file)).write( FaweAPI.wrapPlayer(player).getSession().getClipboard().getClipboard(),