Disable copying entities (WorldEdit 7), and enable removing entities (WorldEdit 6)
- Fixes security problem of #273: - Throw item into a region - Rent/buy the region -> it gets saved as schematic - Pick up items - Unrent/sell the region -> items appear again - Pick up second set of items, they got duplicated
This commit is contained in:
parent
bdea9448a4
commit
36d2ce60b9
|
@ -100,6 +100,7 @@ public class WorldEditHandler6 extends WorldEditInterface {
|
|||
// Build operation
|
||||
BlockTransformExtent extent = new BlockTransformExtent(clipboardHolder.getClipboard(), clipboardHolder.getTransform(), editSession.getWorld().getWorldData().getBlockRegistry());
|
||||
ForwardExtentCopy copy = new ForwardExtentCopy(extent, clipboard.getRegion(), clipboard.getOrigin(), editSession, origin);
|
||||
copy.setRemovingEntities(true);
|
||||
copy.setTransform(clipboardHolder.getTransform());
|
||||
// Mask to region (for polygon and other weird shaped regions)
|
||||
// TODO make this more efficient (especially for polygon regions)
|
||||
|
|
|
@ -117,6 +117,7 @@ public class WorldEditHandler7 extends WorldEditInterface {
|
|||
// Build operation
|
||||
BlockTransformExtent extent = new BlockTransformExtent(clipboardHolder.getClipboard(), clipboardHolder.getTransform());
|
||||
ForwardExtentCopy copy = new ForwardExtentCopy(extent, clipboard.getRegion(), clipboard.getOrigin(), editSession, origin);
|
||||
copy.setCopyingEntities(false);
|
||||
copy.setTransform(clipboardHolder.getTransform());
|
||||
// Mask to region (for polygon and other weird shaped regions)
|
||||
// TODO make this more efficient (especially for polygon regions)
|
||||
|
|
Loading…
Reference in New Issue