mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Fixed arguments with /removeabove and /removebelow.
This commit is contained in:
parent
02ef9610be
commit
35f46473de
@ -440,7 +440,7 @@ public class WorldEdit extends Plugin {
|
|||||||
|
|
||||||
// Remove blocks above current position
|
// Remove blocks above current position
|
||||||
} else if (split[0].equalsIgnoreCase("/removeabove")) {
|
} else if (split[0].equalsIgnoreCase("/removeabove")) {
|
||||||
int size = split.length > 1 ? Math.max(1, Integer.parseInt(split[1]) - 1) : 0;
|
int size = split.length > 1 ? Math.max(0, Integer.parseInt(split[1]) - 1) : 0;
|
||||||
int height = split.length > 2 ? Math.max(1, Integer.parseInt(split[2])) : 127;
|
int height = split.length > 2 ? Math.max(1, Integer.parseInt(split[2])) : 127;
|
||||||
|
|
||||||
int affected = 0;
|
int affected = 0;
|
||||||
@ -467,14 +467,14 @@ public class WorldEdit extends Plugin {
|
|||||||
|
|
||||||
// Remove blocks below current position
|
// Remove blocks below current position
|
||||||
} else if (split[0].equalsIgnoreCase("/removebelow")) {
|
} else if (split[0].equalsIgnoreCase("/removebelow")) {
|
||||||
int size = split.length > 1 ? Math.max(1, Integer.parseInt(split[1]) - 1) : 0;
|
int size = split.length > 1 ? Math.max(0, Integer.parseInt(split[1]) - 1) : 0;
|
||||||
int height = split.length > 2 ? Math.max(1, Integer.parseInt(split[2])) : 127;
|
int height = split.length > 2 ? Math.max(1, Integer.parseInt(split[2])) : 127;
|
||||||
|
|
||||||
int affected = 0;
|
int affected = 0;
|
||||||
int cx = (int)Math.floor(player.getX());
|
int cx = (int)Math.floor(player.getX());
|
||||||
int cy = (int)Math.floor(player.getY());
|
int cy = (int)Math.floor(player.getY());
|
||||||
int cz = (int)Math.floor(player.getZ());
|
int cz = (int)Math.floor(player.getZ());
|
||||||
int minY = Math.max(0, cy - height + 1);
|
int minY = Math.max(0, cy - height);
|
||||||
|
|
||||||
for (int x = cx - size; x <= cx + size; x++) {
|
for (int x = cx - size; x <= cx + size; x++) {
|
||||||
for (int z = cz - size; z <= cz + size; z++) {
|
for (int z = cz - size; z <= cz + size; z++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user