mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-02-11 11:40:41 +00:00
close stream
This commit is contained in:
parent
8bdbd3e628
commit
254b9d4053
1 changed files with 2 additions and 4 deletions
|
@ -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 a new issue