mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2025-01-01 14:08:11 +01:00
check file format
This commit is contained in:
parent
5bdc2d6519
commit
049aff4d74
@ -332,6 +332,7 @@ public class SchemVis extends ImmutableVirtualWorld {
|
||||
cached.createNewFile();
|
||||
try (FileInputStream in = new FileInputStream(file)) {
|
||||
ClipboardFormat format = ClipboardFormat.findByFile(file);
|
||||
if (format != null) {
|
||||
ClipboardReader reader = format.getReader(in);
|
||||
Clipboard clipboard = reader.read(worldData);
|
||||
clipboard.setOrigin(clipboard.getMinimumPoint());
|
||||
@ -377,6 +378,7 @@ public class SchemVis extends ImmutableVirtualWorld {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
cached.delete();
|
||||
|
Loading…
Reference in New Issue
Block a user