This commit is contained in:
@ -128,15 +128,15 @@ fun Route.configureSchematic() {
|
||||
|
||||
val user = call.principal<SWAuthPrincipal>()!!.user
|
||||
|
||||
var node = SchematicNode.getSchematicNode(user.id, schemName, 0)
|
||||
var node = SchematicNode.getSchematicNode(user.id, schemName, null as Int?)
|
||||
if (node == null) {
|
||||
node = SchematicNode.createSchematic(user.id, schemName, 0)
|
||||
node = SchematicNode.createSchematic(user.id, schemName, null)
|
||||
}
|
||||
|
||||
try {
|
||||
val content = Base64.getDecoder().decode(file.content)
|
||||
|
||||
var schem = nbt.fromStream(DataInputStream(BufferedInputStream(GZIPInputStream(ByteArrayInputStream(content)))))
|
||||
var schem = nbt.fromStream(DataInputStream(BufferedInputStream(GZIPInputStream(content.inputStream()))))
|
||||
|
||||
if (schem.size() == 1) schem = schem.first() as CompoundTag
|
||||
|
||||
|
||||
Reference in New Issue
Block a user