public JSInventory[] getInventories() {
		ArrayList<JSInventory> items = new ArrayList<JSInventory>();
		try {
			for (Widget i = wdg().child; i != null; i = i.next) {
				if (i instanceof Inventory) {
					items.add(new JSInventory(UI.instance.getId(i)));
				}
			}
		} catch (Exception ex) {
			// Do nothing
		}
		JSInventory[] ret = new JSInventory[items.size()];
		for (int i = 0; i < items.size(); i++)
			ret[i] = items.get(i);
		return ret;
	}