Skip to content

Commit 25957c4

Browse files
committed
Check limit == -1 in the copy/cut code.
Fixes #1540.
1 parent fd8dbdd commit 25957c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

worldedit-core/src/main/java/com/sk89q/worldedit/command/ClipboardCommands.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public class ClipboardCommands {
7676
*/
7777
private void checkRegionBounds(Region region, LocalSession session) throws MaxChangedBlocksException {
7878
int limit = session.getBlockChangeLimit();
79-
if (region.getBoundingBox().getVolume() > limit) {
79+
if (limit >= 0 && region.getBoundingBox().getVolume() >= limit) {
8080
throw new MaxChangedBlocksException(limit);
8181
}
8282
}

0 commit comments

Comments
 (0)