SteamWar/SpigotCore
Archiviert
13
0

Current state
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
Lixfel 2022-11-15 18:40:48 +01:00
Ursprung 18525814d8
Commit 37c01fece7
2 geänderte Dateien mit 8 neuen und 1 gelöschten Zeilen

@ -1 +1 @@
Subproject commit bd626bb4e6366f1e5e7e64765a6e47fefe05b16a Subproject commit e9a39d007d83a93e7dc50ab2706c9f16213bc900

Datei anzeigen

@ -22,17 +22,24 @@ package de.steamwar.sql;
import com.sk89q.worldedit.extent.clipboard.Clipboard; import com.sk89q.worldedit.extent.clipboard.Clipboard;
import de.steamwar.core.Core; import de.steamwar.core.Core;
import de.steamwar.core.WorldEditWrapper; import de.steamwar.core.WorldEditWrapper;
import de.steamwar.sql.internal.SqlTypeMapper;
import de.steamwar.sql.internal.Statement; import de.steamwar.sql.internal.Statement;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.PipedInputStream;
import java.sql.Blob; import java.sql.Blob;
import java.sql.PreparedStatement;
import java.util.zip.GZIPInputStream; import java.util.zip.GZIPInputStream;
public class SchematicData { public class SchematicData {
static {
new SqlTypeMapper<>(PipedInputStream.class, "BLOB", (rs, identifier) -> { throw new SecurityException("PipedInputStream is write only datatype"); }, PreparedStatement::setBinaryStream);
}
public static Clipboard clipboardFromStream(InputStream is, boolean schemFormat) { public static Clipboard clipboardFromStream(InputStream is, boolean schemFormat) {
try { try {
return WorldEditWrapper.impl.getClipboard(is, schemFormat); return WorldEditWrapper.impl.getClipboard(is, schemFormat);