13
0

Fixing save 1.12 positioning bug

Dieser Commit ist enthalten in:
Lixfel 2019-11-10 20:48:13 +01:00
Ursprung d5f79a91dc
Commit 602ea38b24

Datei anzeigen

@ -10,7 +10,6 @@ import com.sk89q.worldedit.bukkit.WorldEditPlugin;
import com.sk89q.worldedit.extension.platform.Actor;
import com.sk89q.worldedit.extent.clipboard.Clipboard;
import com.sk89q.worldedit.extent.clipboard.io.ClipboardFormat;
import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.session.ClipboardHolder;
import com.sk89q.worldedit.world.World;
import org.bukkit.Bukkit;
@ -18,6 +17,7 @@ import org.bukkit.Location;
import org.bukkit.entity.Player;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.file.Files;
@ -38,9 +38,9 @@ class WorldEdit_v12 {
File file = new File(folder, name + ".schematic");
file.createNewFile();
Files.setPosixFilePermissions(file.toPath(), Constants.FILE_PERMS);
Region region = clipboard.getRegion();
Schematic schem = new Schematic(region);
schem.save(file, ClipboardFormat.SCHEMATIC);
ClipboardFormat.SCHEMATIC.getWriter(new FileOutputStream(file)).write(clipboard, clipboardHolder.getWorldData());
}
static void loadClipboardToPlayer(Player player, Clipboard clipboard){