use of com.sk89q.worldedit.world.DataException in project RedProtect by FabioZumbi12.
the class WEListener method pasteWithWE.
public static void pasteWithWE(Player p, File file) {
World world = p.getWorld();
Location loc = p.getLocation();
EditSession es = new EditSession(new BukkitWorld(world), 999999999);
try {
CuboidClipboard cc = CuboidClipboard.loadSchematic(file);
cc.paste(es, new com.sk89q.worldedit.Vector(loc.getX(), loc.getY(), loc.getZ()), false);
} catch (DataException | IOException | MaxChangedBlocksException e) {
e.printStackTrace();
}
}
Aggregations