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