From bca32753b36bf520ffb48ebca1aa64b5c6625bf3 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sat, 24 Sep 2022 20:26:13 +0200 Subject: [PATCH 1/2] Adapt to CommonDB API --- .../src/de/steamwar/bausystem/world/ClipboardListener.java | 5 +++-- .../src/de/steamwar/bausystem/world/regions/Prototype.java | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/BauSystem_Core/src/de/steamwar/bausystem/world/ClipboardListener.java b/BauSystem_Core/src/de/steamwar/bausystem/world/ClipboardListener.java index 6ecdc76..379f099 100644 --- a/BauSystem_Core/src/de/steamwar/bausystem/world/ClipboardListener.java +++ b/BauSystem_Core/src/de/steamwar/bausystem/world/ClipboardListener.java @@ -19,6 +19,7 @@ package de.steamwar.bausystem.world; +import de.steamwar.sql.SchematicData; import de.steamwar.sql.SchematicNode; import de.steamwar.sql.SteamwarUser; import org.bukkit.event.EventHandler; @@ -35,7 +36,7 @@ public class ClipboardListener implements Listener { try { SchematicNode schematic = SchematicNode.getSchematicNode(SteamwarUser.get(e.getPlayer().getUniqueId()).getId(), CLIPBOARD_SCHEMNAME, 0); if (schematic != null) { - schematic.loadToPlayer(e.getPlayer()); + new SchematicData(schematic).loadToPlayer(e.getPlayer()); } } catch (Exception ex) { // ignore cause players do all kind of stuff with schematics.... like massively oversized schems @@ -52,7 +53,7 @@ public class ClipboardListener implements Listener { } try { - schematic.saveFromPlayer(e.getPlayer()); + new SchematicData(schematic).saveFromPlayer(e.getPlayer()); } catch (Exception ex) { if (newSchem) { schematic.delete(); diff --git a/BauSystem_Core/src/de/steamwar/bausystem/world/regions/Prototype.java b/BauSystem_Core/src/de/steamwar/bausystem/world/regions/Prototype.java index 65f59dc..f1ccca1 100644 --- a/BauSystem_Core/src/de/steamwar/bausystem/world/regions/Prototype.java +++ b/BauSystem_Core/src/de/steamwar/bausystem/world/regions/Prototype.java @@ -24,6 +24,7 @@ import com.sk89q.worldedit.extent.clipboard.Clipboard; import de.steamwar.bausystem.WorldeditWrapper; import de.steamwar.bausystem.world.Color; import de.steamwar.sql.NoClipboardException; +import de.steamwar.sql.SchematicData; import de.steamwar.sql.SchematicNode; import org.bukkit.Location; import org.bukkit.configuration.ConfigurationSection; @@ -162,7 +163,7 @@ public class Prototype { if (schem == null) { return paste(new File(schematic), x, y, z, pasteOptions); } else { - return paste(schem.load(), x, y, z, pasteOptions); + return paste(new SchematicData(schem).load(), x, y, z, pasteOptions); } } @@ -177,7 +178,7 @@ public class Prototype { if (schem == null) { return paste(new File(protectSchematic), x, y, z, new PasteOptions(rotate, false, Color.YELLOW)); } else { - return paste(schem.load(), x, y, z, new PasteOptions(rotate, false, Color.YELLOW)); + return paste(new SchematicData(schem).load(), x, y, z, new PasteOptions(rotate, false, Color.YELLOW)); } } -- 2.39.5 From 2fc84cfbcc5284ec51bd3f53b2ad6bb5f9a57433 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sat, 29 Oct 2022 12:29:57 +0200 Subject: [PATCH 2/2] CI Rebuild --- BauSystem_Core/src/de/steamwar/bausystem/BauSystem.java | 1 + 1 file changed, 1 insertion(+) diff --git a/BauSystem_Core/src/de/steamwar/bausystem/BauSystem.java b/BauSystem_Core/src/de/steamwar/bausystem/BauSystem.java index d1a355f..6c9ce7e 100644 --- a/BauSystem_Core/src/de/steamwar/bausystem/BauSystem.java +++ b/BauSystem_Core/src/de/steamwar/bausystem/BauSystem.java @@ -47,6 +47,7 @@ import java.util.UUID; import java.util.logging.Level; public class BauSystem extends JavaPlugin implements Listener { + private static BauSystem plugin; private static Integer owner; public static final String PREFIX = "§eBauSystem§8» §7"; -- 2.39.5