Added block damage support to //replace and //replacenear

This commit is contained in:
zml2008
2011-08-28 23:57:07 -07:00
parent d83fed13fb
commit 1562f17540
5 changed files with 55 additions and 20 deletions

View File

@ -400,6 +400,21 @@ public class WorldEdit {
return getBlock(player, id, false);
}
public Set<BaseBlock> getBlocks (LocalPlayer player, String list, boolean allAllowed)
throws DisallowedItemException, UnknownItemException {
String[] items = list.split(",");
Set<BaseBlock> blocks = new HashSet<BaseBlock>();
for (String id : items) {
blocks.add(getBlock(player, id, allAllowed));
}
return blocks;
}
public Set<BaseBlock> getBlocks(LocalPlayer player, String list)
throws DisallowedItemException, UnknownItemException {
return getBlocks(player, list, false);
}
/**
* Get a list of blocks as a set. This returns a Pattern.
*