Merge pull request 'Add Schematic Revisions' (#93) from schematic-revisions into main

Reviewed-on: SteamWar/SteamWar#93
Reviewed-by: YoyoNow <yoyonow@noreply.localhost>
This commit is contained in:
2025-07-14 09:13:16 +02:00
22 changed files with 229 additions and 97 deletions
@@ -309,8 +309,12 @@ public class CheckCommand extends SWCommand {
private void concludeCheckSession(String reason, SchematicType type, BooleanSupplier sendMessageIsOnline) {
if(SchematicNode.getSchematicNode(schematic.getId()) != null) {
CheckedSchematic.create(schematic, checker.user().getId(), startTime, Timestamp.from(Instant.now()), reason, sendMessageIsOnline.getAsBoolean());
if(type != null)
if(type != null) {
schematic.setSchemtype(type);
if (type == SchematicType.Normal) {
schematic.setPrepared(false);
}
}
}
remove();
@@ -94,7 +94,7 @@ public class DiscordSchemUpload extends ListenerAdapter {
version = NodeData.SchematicFormat.MCEDIT;
}
NodeData.get(node).saveFromStream(new ByteArrayInputStream(bytes), version);
NodeData.saveFromStream(node, new ByteArrayInputStream(bytes), version);
sender.system("DC_SCHEMUPLOAD_SUCCESS", name);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();