Permalink
Browse files

Fixed the automatic selection of a user's pasted area when using //pa…

…ste -s

Fixes WORLDEDIT-3457
  • Loading branch information...
DarkArc committed Jun 29, 2016
1 parent de70fe9 commit 2a28c1a55288b4afe94dcfc036cb6b698ca8b242
Showing with 5 additions and 7 deletions.
  1. +5 −7 worldedit-core/src/main/java/com/sk89q/worldedit/command/ClipboardCommands.java
@@ -22,11 +22,7 @@
import com.sk89q.minecraft.util.commands.Command;
import com.sk89q.minecraft.util.commands.CommandPermissions;
import com.sk89q.minecraft.util.commands.Logging;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.LocalSession;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.*;
import com.sk89q.worldedit.entity.Player;
import com.sk89q.worldedit.extension.platform.Actor;
import com.sk89q.worldedit.extent.clipboard.BlockArrayClipboard;
@@ -162,8 +158,10 @@ public void paste(Player player, LocalSession session, EditSession editSession,
Operations.completeLegacy(operation);
if (selectPasted) {
Vector max = to.add(region.getMaximumPoint().subtract(region.getMinimumPoint()));
RegionSelector selector = new CuboidRegionSelector(player.getWorld(), to, max);
Vector clipboardOffset = clipboard.getRegion().getMinimumPoint().subtract(clipboard.getOrigin());
Vector realTo = to.add(clipboardOffset);
Vector max = realTo.add(region.getMaximumPoint().subtract(region.getMinimumPoint()));
RegionSelector selector = new CuboidRegionSelector(player.getWorld(), realTo, max);
session.setRegionSelector(player.getWorld(), selector);
selector.learnChanges();
selector.explainRegionAdjust(player, session);

0 comments on commit 2a28c1a

Please sign in to comment.