mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 12:25:46 +01:00
close stream
This commit is contained in:
parent
8bdbd3e628
commit
254b9d4053
@ -68,13 +68,13 @@ public class SchematicHandler {
|
||||
InputStream iStream = new FileInputStream(file);
|
||||
NBTInputStream stream = new NBTInputStream(new GZIPInputStream(iStream));
|
||||
CompoundTag tag = (CompoundTag) stream.readTag();
|
||||
stream.close();
|
||||
Map<String, Tag> tagMap = tag.getValue();
|
||||
|
||||
byte[] addId = new byte[0];
|
||||
if (tagMap.containsKey("AddBlocks")) {
|
||||
addId = ByteArrayTag.class.cast(tagMap.get("AddBlocks")).getValue();
|
||||
}
|
||||
|
||||
short width = ShortTag.class.cast(tagMap.get("Width")).getValue();
|
||||
short length = ShortTag.class.cast(tagMap.get("Length")).getValue();
|
||||
short height = ShortTag.class.cast(tagMap.get("Height")).getValue();
|
||||
@ -112,9 +112,7 @@ public class SchematicHandler {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
finally {
|
||||
return schematic;
|
||||
}
|
||||
return schematic;
|
||||
}
|
||||
|
||||
public static class Schematic {
|
||||
|
Loading…
Reference in New Issue
Block a user