mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 17:57:38 +00:00
Tweak removeabove/removebelow commands.
Fix misplaced negative. Layer 0 will always be the current layer, plus <height> layers above/below. No longer adds 1 arbitrarily to height.
This commit is contained in:
parent
57c161a602
commit
018b6bead8
@ -197,10 +197,9 @@ public class UtilityCommands {
|
|||||||
size = Math.max(1, size);
|
size = Math.max(1, size);
|
||||||
we.checkMaxRadius(size);
|
we.checkMaxRadius(size);
|
||||||
World world = player.getWorld();
|
World world = player.getWorld();
|
||||||
height = height != null ? Math.min((world.getMaxY() + 1), height + 2) : (world.getMaxY() + 1);
|
height = height != null ? Math.min((world.getMaxY() + 1), height + 1) : (world.getMaxY() + 1);
|
||||||
|
|
||||||
int affected = editSession.removeAbove(
|
int affected = editSession.removeAbove(session.getPlacementPosition(player), size, height);
|
||||||
session.getPlacementPosition(player), size, height);
|
|
||||||
player.print(affected + " block(s) have been removed.");
|
player.print(affected + " block(s) have been removed.");
|
||||||
return affected;
|
return affected;
|
||||||
}
|
}
|
||||||
@ -220,7 +219,7 @@ public class UtilityCommands {
|
|||||||
size = Math.max(1, size);
|
size = Math.max(1, size);
|
||||||
we.checkMaxRadius(size);
|
we.checkMaxRadius(size);
|
||||||
World world = player.getWorld();
|
World world = player.getWorld();
|
||||||
height = height != null ? Math.min((-world.getMaxY() + 1), height + 2) : (world.getMaxY() + 1);
|
height = height != null ? Math.min((world.getMaxY() + 1), height + 1) : (world.getMaxY() + 1);
|
||||||
|
|
||||||
int affected = editSession.removeBelow(session.getPlacementPosition(player), size, height);
|
int affected = editSession.removeBelow(session.getPlacementPosition(player), size, height);
|
||||||
player.print(affected + " block(s) have been removed.");
|
player.print(affected + " block(s) have been removed.");
|
||||||
|
Loading…
Reference in New Issue
Block a user