forked from SteamWar/SteamWar
Add ErrorLogging for Bugged Schematics
This commit is contained in:
@@ -149,6 +149,22 @@ fun Route.configureSchematic() {
|
||||
return@let SchematicFormat.SPONGE_V2
|
||||
}
|
||||
|
||||
if (version == SchematicFormat.SPONGE_V3) {
|
||||
try {
|
||||
val fawe = schem.getCompound("Metadata")
|
||||
.getCompound("WorldEdit")
|
||||
.getString("Version")
|
||||
|
||||
if (fawe.equals("2.12.3-SNAPSHOT")) {
|
||||
SWException.log("Schematic with Bugged Version Uploaded", """
|
||||
Schematic=$schemName
|
||||
User=${user.userName}
|
||||
Id=${user.id}
|
||||
""".trimIndent())
|
||||
}
|
||||
} catch (_: Exception) {}
|
||||
}
|
||||
|
||||
val data = NodeData(node.id, version)
|
||||
data.saveFromStream(content.inputStream(), version)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user