diff --git a/bukkit110/src/main/resources/plugin.yml b/bukkit110/src/main/resources/plugin.yml index d3f40bf5..ca6853c2 100644 --- a/bukkit110/src/main/resources/plugin.yml +++ b/bukkit110/src/main/resources/plugin.yml @@ -47,3 +47,76 @@ permissions: default: false fawe.reload: default: false + fawe.voxelbrush: + default: op + children: + voxelsniper.brush.ball: true + voxelsniper.brush.biome: true + voxelsniper.brush.blendball: true + voxelsniper.brush.blenddisc: true + voxelsniper.brush.blendvoxel: true + voxelsniper.brush.blendvoxeldisc: true + voxelsniper.brush.blob: true + voxelsniper.brush.blockreset: true + voxelsniper.brush.blockresetsurface: true + voxelsniper.brush.canyon: true + voxelsniper.brush.canyonselection: true + voxelsniper.brush.checkervoxeldisc: true + voxelsniper.brush.cleansnow: true + voxelsniper.brush.clonestamp: true + voxelsniper.brush.copypasta: true + voxelsniper.brush.cylinder: true + voxelsniper.brush.disc: true + voxelsniper.brush.discface: true + voxelsniper.brush.dome: true + voxelsniper.brush.drain: true + voxelsniper.brush.ellipse: true + voxelsniper.brush.ellipsoid: true + voxelsniper.brush.eraser: true + voxelsniper.brush.erode: true + voxelsniper.brush.extrude: true + voxelsniper.brush.filldown: true + voxelsniper.brush.flatocean: true + voxelsniper.brush.heatray: true + voxelsniper.brush.jaggedline: true + voxelsniper.brush.line: true + voxelsniper.brush.move: true + voxelsniper.brush.ocean: true + voxelsniper.brush.overlay: true + voxelsniper.brush.pull: true + voxelsniper.brush.randomerode: true + voxelsniper.brush.ring: true + voxelsniper.brush.rot2d: true + voxelsniper.brush.rot2dvert: true + voxelsniper.brush.rot3d: true + voxelsniper.brush.ruler: true + voxelsniper.brush.scanner: true + voxelsniper.brush.set: true + voxelsniper.brush.setredstoneflip: true + voxelsniper.brush.setredstonerotate: true + voxelsniper.brush.shellball: true + voxelsniper.brush.shellset: true + voxelsniper.brush.shellvoxel: true + voxelsniper.brush.signoverwrite: true + voxelsniper.brush.snipe: true + voxelsniper.brush.snowcone: true + voxelsniper.brush.spiralstaircase: true + voxelsniper.brush.splatterball: true + voxelsniper.brush.splatterdisc: true + voxelsniper.brush.splatteroverlay: true + voxelsniper.brush.splattervoxel: true + voxelsniper.brush.splattervoxeldisc: true + voxelsniper.brush.spline: true + voxelsniper.brush.stamp: true + voxelsniper.brush.stencil: true + voxelsniper.brush.stencillist: true + voxelsniper.brush.threepointcircle: true + voxelsniper.brush.triangle: true + voxelsniper.brush.underlay: true + voxelsniper.brush.voltmeter: true + voxelsniper.brush.voxel: true + voxelsniper.brush.voxeldisc: true + voxelsniper.brush.voxeldiscface: true + voxelsniper.brush.warp: true + voxelsniper.goto: true + voxelsniper.sniper: true \ No newline at end of file diff --git a/bukkit18/src/main/resources/plugin.yml b/bukkit18/src/main/resources/plugin.yml index dcf58a70..0b5ebfab 100644 --- a/bukkit18/src/main/resources/plugin.yml +++ b/bukkit18/src/main/resources/plugin.yml @@ -47,3 +47,76 @@ permissions: default: false fawe.reload: default: false + fawe.voxelbrush: + default: op + children: + voxelsniper.brush.ball: true + voxelsniper.brush.biome: true + voxelsniper.brush.blendball: true + voxelsniper.brush.blenddisc: true + voxelsniper.brush.blendvoxel: true + voxelsniper.brush.blendvoxeldisc: true + voxelsniper.brush.blob: true + voxelsniper.brush.blockreset: true + voxelsniper.brush.blockresetsurface: true + voxelsniper.brush.canyon: true + voxelsniper.brush.canyonselection: true + voxelsniper.brush.checkervoxeldisc: true + voxelsniper.brush.cleansnow: true + voxelsniper.brush.clonestamp: true + voxelsniper.brush.copypasta: true + voxelsniper.brush.cylinder: true + voxelsniper.brush.disc: true + voxelsniper.brush.discface: true + voxelsniper.brush.dome: true + voxelsniper.brush.drain: true + voxelsniper.brush.ellipse: true + voxelsniper.brush.ellipsoid: true + voxelsniper.brush.eraser: true + voxelsniper.brush.erode: true + voxelsniper.brush.extrude: true + voxelsniper.brush.filldown: true + voxelsniper.brush.flatocean: true + voxelsniper.brush.heatray: true + voxelsniper.brush.jaggedline: true + voxelsniper.brush.line: true + voxelsniper.brush.move: true + voxelsniper.brush.ocean: true + voxelsniper.brush.overlay: true + voxelsniper.brush.pull: true + voxelsniper.brush.randomerode: true + voxelsniper.brush.ring: true + voxelsniper.brush.rot2d: true + voxelsniper.brush.rot2dvert: true + voxelsniper.brush.rot3d: true + voxelsniper.brush.ruler: true + voxelsniper.brush.scanner: true + voxelsniper.brush.set: true + voxelsniper.brush.setredstoneflip: true + voxelsniper.brush.setredstonerotate: true + voxelsniper.brush.shellball: true + voxelsniper.brush.shellset: true + voxelsniper.brush.shellvoxel: true + voxelsniper.brush.signoverwrite: true + voxelsniper.brush.snipe: true + voxelsniper.brush.snowcone: true + voxelsniper.brush.spiralstaircase: true + voxelsniper.brush.splatterball: true + voxelsniper.brush.splatterdisc: true + voxelsniper.brush.splatteroverlay: true + voxelsniper.brush.splattervoxel: true + voxelsniper.brush.splattervoxeldisc: true + voxelsniper.brush.spline: true + voxelsniper.brush.stamp: true + voxelsniper.brush.stencil: true + voxelsniper.brush.stencillist: true + voxelsniper.brush.threepointcircle: true + voxelsniper.brush.triangle: true + voxelsniper.brush.underlay: true + voxelsniper.brush.voltmeter: true + voxelsniper.brush.voxel: true + voxelsniper.brush.voxeldisc: true + voxelsniper.brush.voxeldiscface: true + voxelsniper.brush.warp: true + voxelsniper.goto: true + voxelsniper.sniper: true \ No newline at end of file diff --git a/bukkit19/src/main/resources/plugin.yml b/bukkit19/src/main/resources/plugin.yml index 6cac38db..00e13338 100644 --- a/bukkit19/src/main/resources/plugin.yml +++ b/bukkit19/src/main/resources/plugin.yml @@ -47,3 +47,76 @@ permissions: default: false fawe.reload: default: false + fawe.voxelbrush: + default: op + children: + voxelsniper.brush.ball: true + voxelsniper.brush.biome: true + voxelsniper.brush.blendball: true + voxelsniper.brush.blenddisc: true + voxelsniper.brush.blendvoxel: true + voxelsniper.brush.blendvoxeldisc: true + voxelsniper.brush.blob: true + voxelsniper.brush.blockreset: true + voxelsniper.brush.blockresetsurface: true + voxelsniper.brush.canyon: true + voxelsniper.brush.canyonselection: true + voxelsniper.brush.checkervoxeldisc: true + voxelsniper.brush.cleansnow: true + voxelsniper.brush.clonestamp: true + voxelsniper.brush.copypasta: true + voxelsniper.brush.cylinder: true + voxelsniper.brush.disc: true + voxelsniper.brush.discface: true + voxelsniper.brush.dome: true + voxelsniper.brush.drain: true + voxelsniper.brush.ellipse: true + voxelsniper.brush.ellipsoid: true + voxelsniper.brush.eraser: true + voxelsniper.brush.erode: true + voxelsniper.brush.extrude: true + voxelsniper.brush.filldown: true + voxelsniper.brush.flatocean: true + voxelsniper.brush.heatray: true + voxelsniper.brush.jaggedline: true + voxelsniper.brush.line: true + voxelsniper.brush.move: true + voxelsniper.brush.ocean: true + voxelsniper.brush.overlay: true + voxelsniper.brush.pull: true + voxelsniper.brush.randomerode: true + voxelsniper.brush.ring: true + voxelsniper.brush.rot2d: true + voxelsniper.brush.rot2dvert: true + voxelsniper.brush.rot3d: true + voxelsniper.brush.ruler: true + voxelsniper.brush.scanner: true + voxelsniper.brush.set: true + voxelsniper.brush.setredstoneflip: true + voxelsniper.brush.setredstonerotate: true + voxelsniper.brush.shellball: true + voxelsniper.brush.shellset: true + voxelsniper.brush.shellvoxel: true + voxelsniper.brush.signoverwrite: true + voxelsniper.brush.snipe: true + voxelsniper.brush.snowcone: true + voxelsniper.brush.spiralstaircase: true + voxelsniper.brush.splatterball: true + voxelsniper.brush.splatterdisc: true + voxelsniper.brush.splatteroverlay: true + voxelsniper.brush.splattervoxel: true + voxelsniper.brush.splattervoxeldisc: true + voxelsniper.brush.spline: true + voxelsniper.brush.stamp: true + voxelsniper.brush.stencil: true + voxelsniper.brush.stencillist: true + voxelsniper.brush.threepointcircle: true + voxelsniper.brush.triangle: true + voxelsniper.brush.underlay: true + voxelsniper.brush.voltmeter: true + voxelsniper.brush.voxel: true + voxelsniper.brush.voxeldisc: true + voxelsniper.brush.voxeldiscface: true + voxelsniper.brush.warp: true + voxelsniper.goto: true + voxelsniper.sniper: true \ No newline at end of file diff --git a/core/src/main/java/com/boydti/fawe/Fawe.java b/core/src/main/java/com/boydti/fawe/Fawe.java index 2cf07063..e9d5c237 100644 --- a/core/src/main/java/com/boydti/fawe/Fawe.java +++ b/core/src/main/java/com/boydti/fawe/Fawe.java @@ -17,6 +17,7 @@ import com.boydti.fawe.util.MemUtil; import com.boydti.fawe.util.TaskManager; import com.boydti.fawe.util.WEManager; import com.boydti.fawe.util.WESubscriber; +import com.intellectualcrafters.plot.util.StringMan; import com.sk89q.worldedit.CuboidClipboard; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.LocalSession; @@ -229,6 +230,8 @@ public class Fawe { public void setupConfigs() { // Setting up config.yml File file = new File(this.IMP.getDirectory(), "config.yml"); + Settings.VERSION = StringMan.join(IMP.getVersion(), "."); + Settings.PLATFORM = IMP.getPlatform(); Settings.load(file); Settings.save(file); // Setting up message.yml diff --git a/core/src/main/java/com/boydti/fawe/object/brush/CopyBrush.java b/core/src/main/java/com/boydti/fawe/object/brush/CopyBrush.java index b2137807..e47552b9 100644 --- a/core/src/main/java/com/boydti/fawe/object/brush/CopyBrush.java +++ b/core/src/main/java/com/boydti/fawe/object/brush/CopyBrush.java @@ -59,12 +59,17 @@ public class CopyBrush implements Brush { return false; } }; + // Add origin + mask.test(position); + RecursiveVisitor visitor = new RecursiveVisitor(mask, new NullRegionFunction()); visitor.visit(position); Operations.completeBlindly(visitor); - // To clipboard + // Build the clipboard Clipboard clipboard = builder.build(); - session.setClipboard(new ClipboardHolder(clipboard, editSession.getWorld().getWorldData())); + clipboard.setOrigin(position); + ClipboardHolder holder = new ClipboardHolder(clipboard, editSession.getWorld().getWorldData()); + session.setClipboard(holder); int blocks = builder.size(); BBC.COMMAND_COPY.send(player, blocks); }