From c08cec7cf251b955628c986b84c5e9f06bc3ed43 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 2 Dec 2023 16:02:30 +0100 Subject: [PATCH 1/2] Add pasting of non prepared schem on red side --- .../src/de/steamwar/fightsystem/FightSystem.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.java b/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.java index 78bb14c..3ee5d15 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.java @@ -168,7 +168,13 @@ public class FightSystem extends JavaPlugin { if(Config.mode == ArenaMode.EVENT) { FightState.setFightState(FightState.PRE_SCHEM_SETUP); }else if(Config.mode == ArenaMode.CHECK){ - Fight.getBlueTeam().setSchem(SchematicNode.getSchematicNode(Config.CheckSchemID)); + SchematicNode checkSchematicNode = SchematicNode.getSchematicNode(Config.CheckSchemID); + Fight.getBlueTeam().setSchem(checkSchematicNode); + + if (checkSchematicNode.getName().endsWith("-prepared")) { + SchematicNode nonPreparedSchematicNode = SchematicNode.getSchematicNode(checkSchematicNode.getOwner(), checkSchematicNode.getName().substring(0, checkSchematicNode.getName().length() - 9), checkSchematicNode.getParent()); + Fight.getRedTeam().setSchem(nonPreparedSchematicNode); + } }else if(Config.mode == ArenaMode.PREPARE) { Fight.getUnrotated().setSchem(SchematicNode.getSchematicNode(Config.PrepareSchemID)); } -- 2.39.5 From 2e8ad5301ee0e4418fa87c066b3b493a89d53f4f Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 2 Dec 2023 20:03:48 +0100 Subject: [PATCH 2/2] Add pasting of non prepared schem on red side --- .../src/de/steamwar/fightsystem/FightSystem.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.java b/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.java index 3ee5d15..3c10d4f 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.java @@ -172,8 +172,10 @@ public class FightSystem extends JavaPlugin { Fight.getBlueTeam().setSchem(checkSchematicNode); if (checkSchematicNode.getName().endsWith("-prepared")) { - SchematicNode nonPreparedSchematicNode = SchematicNode.getSchematicNode(checkSchematicNode.getOwner(), checkSchematicNode.getName().substring(0, checkSchematicNode.getName().length() - 9), checkSchematicNode.getParent()); - Fight.getRedTeam().setSchem(nonPreparedSchematicNode); + SchematicNode unpreparedSchematicNode = SchematicNode.getSchematicNode(checkSchematicNode.getOwner(), checkSchematicNode.getName().substring(0, checkSchematicNode.getName().length() - 9), checkSchematicNode.getParent()); + if (unpreparedSchematicNode != null) { + Fight.getRedTeam().setSchem(unpreparedSchematicNode); + } } }else if(Config.mode == ArenaMode.PREPARE) { Fight.getUnrotated().setSchem(SchematicNode.getSchematicNode(Config.PrepareSchemID)); -- 2.39.5