use of com.sk89q.worldedit.command.tool.brush.ClipboardBrush in project FastAsyncWorldEdit by IntellectualSites.
the class BrushCommands method clipboardBrush.
@Command(name = "clipboard", desc = "@Deprecated use instead: `/br copypaste`)", descFooter = "Choose the clipboard brush.\n" + "Without the -o flag, the paste will appear centered at the target location. " + "With the flag, then the paste will appear relative to where you had " + "stood relative to the copied area when you copied it.")
@Deprecated
@CommandPermissions("worldedit.brush.clipboard")
public void clipboardBrush(Player player, LocalSession session, @Switch(name = 'a', desc = "Don't paste air from the clipboard") boolean ignoreAir, @Switch(name = 'o', desc = "Paste starting at the target location, instead of centering on it") boolean usingOrigin, @Switch(name = 'e', desc = "Paste entities if available") boolean pasteEntities, @Switch(name = 'b', desc = "Paste biomes if available") boolean pasteBiomes, @ArgFlag(name = 'm', desc = "Skip blocks matching this mask in the clipboard") @ClipboardMask Mask sourceMask, InjectedValueAccess context) throws WorldEditException {
ClipboardHolder holder = session.getClipboard();
Clipboard clipboard = holder.getClipboard();
ClipboardHolder newHolder = new ClipboardHolder(clipboard);
newHolder.setTransform(holder.getTransform());
BlockVector3 size = clipboard.getDimensions();
worldEdit.checkMaxBrushRadius(size.getBlockX() / 2D - 1);
worldEdit.checkMaxBrushRadius(size.getBlockY() / 2D - 1);
worldEdit.checkMaxBrushRadius(size.getBlockZ() / 2D - 1);
set(context, new ClipboardBrush(newHolder, ignoreAir, usingOrigin, pasteEntities, pasteBiomes, sourceMask), "worldedit.brush.clipboard");
}
Aggregations