Search in sources :

Example 1 with ClipboardReader

use of com.sk89q.worldedit.extent.clipboard.io.ClipboardReader in project Skree by Skelril.

the class WEDecorator method getHolder.

private ClipboardHolder getHolder(String resourceName, WorldData worldData) throws IOException {
    try (InputStream bis = Files.newInputStream(getFile(resourceName))) {
        ClipboardReader reader = ClipboardFormat.SCHEMATIC.getReader(bis);
        Clipboard clipboard = reader.read(worldData);
        return new ClipboardHolder(clipboard, worldData);
    }
}
Also used : ClipboardHolder(com.sk89q.worldedit.session.ClipboardHolder) InputStream(java.io.InputStream) Clipboard(com.sk89q.worldedit.extent.clipboard.Clipboard) ClipboardReader(com.sk89q.worldedit.extent.clipboard.io.ClipboardReader)

Aggregations

Clipboard (com.sk89q.worldedit.extent.clipboard.Clipboard)1 ClipboardReader (com.sk89q.worldedit.extent.clipboard.io.ClipboardReader)1 ClipboardHolder (com.sk89q.worldedit.session.ClipboardHolder)1 InputStream (java.io.InputStream)1