Added /removenear.

This commit is contained in:
sk89q
2010-10-18 16:36:22 -07:00
parent 94876194c4
commit ccab458d9c
2 changed files with 43 additions and 0 deletions

View File

@ -130,6 +130,7 @@ public class WorldEdit {
commands.put("//overlay", "[ID] - Overlay the area one layer");
commands.put("/removeabove", "<Size> <Height> - Remove blocks above head");
commands.put("/removebelow", "<Size> <Height> - Remove blocks below position");
commands.put("/removenear", "<ID> <Size> - Remove blocks near you");
commands.put("//copy", "Copies the currently selected region");
commands.put("//cut", "Cuts the currently selected region");
commands.put("//paste", "Pastes the clipboard");
@ -492,6 +493,18 @@ public class WorldEdit {
return true;
// Remove blocks near
} else if (split[0].equalsIgnoreCase("/removenear")) {
checkArgs(split, 2, 2, split[0]);
BaseBlock block = getBlock(split[1]);
int size = Math.max(1, Integer.parseInt(split[2]));
int affected = editSession.removeNear(
session.getPlacementPosition(player), block.getID(), size);
player.print(affected + " block(s) have been removed.");
return true;
// Load .schematic to clipboard
} else if (split[0].equalsIgnoreCase("//load")) {
checkArgs(split, 1, 1, split[0]);