From 34992344b2c9554e24a087afd9bccee169e72322 Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Tue, 12 May 2026 16:47:30 +0200 Subject: [PATCH] Fix CheckCommand.accept --- .../steamwar/velocitycore/commands/CheckCommand.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/CheckCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/CheckCommand.java index 3b95a338..8ee5a54c 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/CheckCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/CheckCommand.java @@ -316,8 +316,18 @@ public class CheckCommand extends SWCommand { SchematicNode node = SchematicNode.createSchematic(-1, name, teamFolder.getNodeId()); NodeData.saveFromStream(node, data.schemData(false), data.getNodeFormat()); - // Accept the team folder schematic and set other to Normal + // Accept the team folder schematic and set other to Normal as well as adding the original owner on the schematic node.setSchemtype(GameModeConfig.getBySchematicType(schematic.getSchemtype()).Schematic.Type); + NodeMember.createNodeMember(node.getNodeId(), schematic.getOwner()); + + // Remove any added players from the schematic in the folder + for (SchematicNode schematicNode : SchematicNode.getSchematicNodeInNode(teamFolder.getNodeId())) { + if (schematicNode.getNodeId() == node.getNodeId()) continue; + for (NodeMember nodeMember : NodeMember.getNodeMembers(schematicNode.getNodeId())) { + NodeMember.createNodeMember(node.getNodeId(), nodeMember.getMember()); + nodeMember.delete(); + } + } // Conclude by setting send in schematic to normal and broadcast concludeCheckSession("freigegeben", SchematicType.Normal, () -> {