Dieser Commit ist enthalten in:
Ursprung
311bb09a19
Commit
aaaaa87999
@ -19,13 +19,12 @@
|
|||||||
|
|
||||||
package de.steamwar.core;
|
package de.steamwar.core;
|
||||||
|
|
||||||
import com.fastasyncworldedit.core.extent.clipboard.io.FastSchematicReader;
|
|
||||||
import com.sk89q.jnbt.NBTInputStream;
|
import com.sk89q.jnbt.NBTInputStream;
|
||||||
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
||||||
import com.sk89q.worldedit.extent.clipboard.io.MCEditSchematicReader;
|
import com.sk89q.worldedit.extent.clipboard.io.MCEditSchematicReader;
|
||||||
|
import com.sk89q.worldedit.extent.clipboard.io.SpongeSchematicReader;
|
||||||
import de.steamwar.sql.NoClipboardException;
|
import de.steamwar.sql.NoClipboardException;
|
||||||
|
|
||||||
import java.io.BufferedInputStream;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
||||||
@ -35,9 +34,9 @@ public class WorldEditWrapper18 extends WorldEditWrapper14 {
|
|||||||
@SuppressWarnings("removal")
|
@SuppressWarnings("removal")
|
||||||
public Clipboard getClipboard(InputStream is, boolean schemFormat) throws IOException {
|
public Clipboard getClipboard(InputStream is, boolean schemFormat) throws IOException {
|
||||||
//Use FAWE reader due to FAWE capability of reading corrupt FAWE schems
|
//Use FAWE reader due to FAWE capability of reading corrupt FAWE schems
|
||||||
NBTInputStream nbtStream = new NBTInputStream(new BufferedInputStream(is));
|
NBTInputStream nbtStream = new NBTInputStream(is);
|
||||||
try {
|
try {
|
||||||
return (schemFormat ? new FastSchematicReader(nbtStream) : new MCEditSchematicReader(nbtStream)).read();
|
return (schemFormat ? new SpongeSchematicReader(nbtStream) : new MCEditSchematicReader(nbtStream)).read();
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
throw new NoClipboardException();
|
throw new NoClipboardException();
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren