Name | <ListTag.sort_by_number[<tag>]> |
Returns | ListTag |
Description | Returns a copy of the list, sorted such that the lower numbers appear first, and the higher numbers appear last.
Rather than sorting based on the item itself, it sorts based on a tag attribute read from within the object being read. For example, you might sort a list of players based on the amount of money they have, via .sort_by_number[money] on the list of valid players. Non-numerical input is considered an error, and the result is not guaranteed. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2173 |