mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Merge branch 'features/v5/internal-updates' of https://github.com/IntellectualSites/PlotSquared into features/v5/internal-updates
This commit is contained in:
commit
37336fffe2
@ -282,7 +282,7 @@ public abstract class SchematicHandler {
|
|||||||
Settings.Paths.SCHEMATICS + File.separator + name);
|
Settings.Paths.SCHEMATICS + File.separator + name);
|
||||||
if (!file.exists()) {
|
if (!file.exists()) {
|
||||||
file = MainUtil.getFile(PlotSquared.get().IMP.getDirectory(),
|
file = MainUtil.getFile(PlotSquared.get().IMP.getDirectory(),
|
||||||
Settings.Paths.SCHEMATICS + File.separator + name + "atic");
|
Settings.Paths.SCHEMATICS + File.separator + name);
|
||||||
}
|
}
|
||||||
return getSchematic(file);
|
return getSchematic(file);
|
||||||
}
|
}
|
||||||
@ -319,18 +319,17 @@ public abstract class SchematicHandler {
|
|||||||
if (!file.exists()) {
|
if (!file.exists()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
try {
|
ClipboardFormat format = ClipboardFormats.findByFile(file);
|
||||||
ClipboardFormat format = ClipboardFormats.findByFile(file);
|
if (format != null) {
|
||||||
if (format != null) {
|
try (ClipboardReader reader = format.getReader(new FileInputStream(file))) {
|
||||||
ClipboardReader reader = format.getReader(new FileInputStream(file));
|
|
||||||
Clipboard clip = reader.read();
|
Clipboard clip = reader.read();
|
||||||
return new Schematic(clip);
|
return new Schematic(clip);
|
||||||
} else {
|
} catch (IOException e) {
|
||||||
throw new UnsupportedFormatException(
|
e.printStackTrace();
|
||||||
"This schematic format is not recognised or supported.");
|
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} else {
|
||||||
e.printStackTrace();
|
throw new UnsupportedFormatException(
|
||||||
|
"This schematic format is not recognised or supported.");
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user