From aaaaa879999d86fa7f2ef29d2b0752e305f3da87 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Thu, 31 Aug 2023 19:00:35 +0200 Subject: [PATCH] Fix buffering issues in replays --- SpigotCore_18/src/de/steamwar/core/WorldEditWrapper18.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/SpigotCore_18/src/de/steamwar/core/WorldEditWrapper18.java b/SpigotCore_18/src/de/steamwar/core/WorldEditWrapper18.java index b8e87c3..4942b2a 100644 --- a/SpigotCore_18/src/de/steamwar/core/WorldEditWrapper18.java +++ b/SpigotCore_18/src/de/steamwar/core/WorldEditWrapper18.java @@ -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(); }