sort
Sorts the inventory by names in the order they are specified
Return
true if sorted, false otherwise
Parameters
names
the item names to sort
Sorts the inventory by ids in the order they are specified
Return
true if sorted, false otherwise
Parameters
ids
the item ids to sort
Sorts the inventory by the specified comparator
Return
true if sorted successfully, false otherwise (timed out or too many attempts)
Parameters
comparator
the comparator to sort the inventory