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"; 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)); } }