mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-11-04 11:56:07 +00:00
Allow use of InputStream to load schematics
Conflicts: src/main/java/com/sk89q/worldedit/schematic/MCEditSchematicFormat.java
This commit is contained in:
commit
65ee8bfd2a
@ -45,9 +45,7 @@ public class MCEditSchematicFormat extends SchematicFormat {
|
||||
super("MCEdit", "mcedit", "mce");
|
||||
}
|
||||
|
||||
@Override
|
||||
public CuboidClipboard load(File file) throws IOException, DataException {
|
||||
FileInputStream stream = new FileInputStream(file);
|
||||
public CuboidClipboard load(InputStream stream) throws IOException, DataException {
|
||||
NBTInputStream nbtStream = new NBTInputStream(
|
||||
new GZIPInputStream(stream));
|
||||
|
||||
@ -186,6 +184,11 @@ public class MCEditSchematicFormat extends SchematicFormat {
|
||||
return clipboard;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CuboidClipboard load(File file) throws IOException, DataException {
|
||||
return load(new FileInputStream(file));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(CuboidClipboard clipboard, File file) throws IOException, DataException {
|
||||
int width = clipboard.getWidth();
|
||||
|
Loading…
Reference in New Issue
Block a user