From 97baf79dcb75708cb929fce2a95f36def33c69d2 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Tue, 15 Mar 2022 16:23:17 +0100 Subject: [PATCH] Conditional recoloring Signed-off-by: Lixfel --- .../src/de/steamwar/fightsystem/fight/FightSchematic.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightSchematic.java b/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightSchematic.java index c0ae208..b0d6b8e 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightSchematic.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightSchematic.java @@ -71,6 +71,9 @@ public class FightSchematic extends StateDependent { schematic = schem.getId(); try { clipboard = schem.load(); + + if(schem.replaceColor()) + replaceTeamColor(clipboard); } catch (IOException e) { team.broadcastSystem("SCHEMATIC_UNLOADABLE"); Bukkit.getLogger().log(Level.SEVERE, e, () -> "Couldn't load Schematic " + schem.getName()); @@ -127,8 +130,6 @@ public class FightSchematic extends StateDependent { private void paste(){ FreezeWorld freezer = new FreezeWorld(); - replaceTeamColor(clipboard); - Vector dims = WorldeditWrapper.impl.getDimensions(clipboard); WorldeditWrapper.impl.pasteClipboard( clipboard,