SteamWar/BauSystem
Archiviert
13
0

Adapt to CommonDB API #265

Zusammengeführt
Lixfel hat 2 Commits von commonDB nach master 2022-10-29 12:44:09 +02:00 zusammengeführt
3 geänderte Dateien mit 7 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -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";

Datei anzeigen

@ -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();

Datei anzeigen

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