diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/CheckCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/CheckCommand.java index af6328b2..7fb5118a 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/CheckCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/CheckCommand.java @@ -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; - CheckedSchematic.create(schematic, checker.user().getId(), startTime, Timestamp.from(Instant.now()), reason); - if(type != null) - schematic.setSchemtype(type); + 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() {