Skip to content

Commit

Permalink
Fix setting inventories, fixes #912
Browse files Browse the repository at this point in the history
  • Loading branch information
Morphan1 committed Dec 31, 2014
1 parent 9f51fde commit 983d71a
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -80,7 +80,9 @@ public static dInventory getInventory(Argument arg, dPlayer player, dNPC npc) {
else if (arg.matchesArgumentList(dItem.class)) {
List<dItem> list = dList.valueOf(string).filter(dItem.class);
ItemStack[] items = convertItems(list).toArray(new ItemStack[list.size()]);
return new dInventory(dInventory.maxSlots).add(0, items);
dInventory inventory = new dInventory(dInventory.maxSlots);
inventory.setContents(items);
return inventory;
}
else if (dLocation.matches(string)) {
return dLocation.valueOf(string).getInventory();
Expand Down

0 comments on commit 983d71a

Please sign in to comment.