Add amount of missing blocks to message when using inventory.

This commit is contained in:
Wizjany
2012-12-28 19:26:57 -05:00
parent 79802bd4b9
commit e09a0c64ad
2 changed files with 13 additions and 7 deletions

View File

@ -1079,7 +1079,7 @@ public class WorldEdit {
blockBag.flushChanges();
}
Set<Integer> missingBlocks = editSession.popMissingBlocks();
Map<Integer, Integer> missingBlocks = editSession.popMissingBlocks();
if (missingBlocks.size() > 0) {
StringBuilder str = new StringBuilder();
@ -1087,13 +1087,15 @@ public class WorldEdit {
int size = missingBlocks.size();
int i = 0;
for (Integer id : missingBlocks) {
for (Integer id : missingBlocks.keySet()) {
BlockType type = BlockType.fromID(id);
str.append(type != null
? type.getName() + " (" + id + ")"
: id.toString());
str.append(" [Amt: " + missingBlocks.get(id) + "]");
++i;
if (i != size) {