Fix checking deleted schematic limbo
This commit is contained in:
@@ -272,12 +272,13 @@ public class CheckCommand extends SWCommand {
|
||||
}
|
||||
|
||||
private boolean concludeCheckSession(String reason, SchematicType type) {
|
||||
if(SchematicNode.getSchematicNode(schematic.getId()) == null) // Schematic was deleted
|
||||
return false;
|
||||
boolean exists = SchematicNode.getSchematicNode(schematic.getId()) != null;
|
||||
|
||||
if(exists) {
|
||||
CheckedSchematic.create(schematic, checker.user().getId(), startTime, Timestamp.from(Instant.now()), reason);
|
||||
if(type != null)
|
||||
schematic.setSchemtype(type);
|
||||
}
|
||||
|
||||
remove();
|
||||
VelocityCore.schedule(() -> {
|
||||
@@ -285,7 +286,7 @@ public class CheckCommand extends SWCommand {
|
||||
if(subserver != null)
|
||||
subserver.stop();
|
||||
}).schedule();
|
||||
return true;
|
||||
return exists;
|
||||
}
|
||||
|
||||
private void remove() {
|
||||
|
||||
Reference in New Issue
Block a user