mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-30 22:53:31 +01:00
Accidentally compressed twice
This commit is contained in:
parent
36a1e9f744
commit
421b992b67
@ -61,7 +61,6 @@ import com.sk89q.worldedit.session.ClipboardHolder;
|
||||
import com.sk89q.worldedit.util.Location;
|
||||
import com.sk89q.worldedit.util.command.binding.Switch;
|
||||
import com.sk89q.worldedit.util.command.parametric.Optional;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.Iterator;
|
||||
@ -233,10 +232,6 @@ public class ClipboardCommands {
|
||||
ClipboardWriter writer = format.getWriter(baos);
|
||||
writer.write(clipboard, null);
|
||||
baos.flush();
|
||||
FileOutputStream fos = new FileOutputStream("blah.png");
|
||||
fos.write(baos.toByteArray());
|
||||
fos.close();
|
||||
url = null;
|
||||
url = ImgurUtility.uploadImage(baos.toByteArray());
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -69,11 +69,11 @@ public enum ClipboardFormat {
|
||||
|
||||
@Override
|
||||
public ClipboardWriter getWriter(OutputStream outputStream) throws IOException {
|
||||
outputStream = new BufferedOutputStream(outputStream);
|
||||
GZIPOutputStream gzip;
|
||||
if (outputStream instanceof GZIPOutputStream) {
|
||||
gzip = (GZIPOutputStream) outputStream;
|
||||
} else {
|
||||
outputStream = new BufferedOutputStream(outputStream);
|
||||
gzip = new GZIPOutputStream(outputStream, true);
|
||||
}
|
||||
NBTOutputStream nbtStream = new NBTOutputStream(new BufferedOutputStream(gzip));
|
||||
|
Loading…
Reference in New Issue
Block a user