Name | <ListTag.alphabetical> |
Returns | ListTag |
Description | Returns the list sorted to be in alphabetical order. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2146 |
Name | <ListTag.alphanumeric> |
Returns | ListTag |
Description | Returns the list sorted to be in alphabetical/numerical order. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2131 |
Name | <ListTag.any> |
Returns | ElementTag(Boolean) |
Description | Returns whether the list is not empty. |
Example |
|
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1060 |
Name | <ListTag.average> |
Returns | ElementTag(Decimal) |
Description | Returns the mean average of all numbers in the list. Ignores non-numerical values. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1798 |
Name | <ListTag.closest_to[<text>]> |
Returns | ElementTag |
Description | Returns the raw text of the item in the list that seems closest to the given value.
Particularly useful for command handlers, "<list[c1|c2|c3|...].closest_to[<argument>]>" to get the best option as "did you mean" suggestion. Be warned that this will always return /something/, excluding the case of an empty list, which will return an empty element. Uses the logic of tag "ElementTag.difference"! You can use that tag to add an upper limit on how different the text can be. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2718 |
Name | <ListTag.combine> |
Returns | ListTag |
Description | Returns a list containing the contents of all sublists within this list. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L743 |
Name | <ListTag.comma_separated> |
Returns | ElementTag |
Description | Returns the list in a cleaner format, separated by commas. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L816 |
Name | <ListTag.contains[<element>|...]> |
Returns | ElementTag(Boolean) |
Description | Returns whether the list contains all of the given elements.
See also ListTag.contains_single for safer single-value checks. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2639 |
Name | <ListTag.contains_any[<element>|...]> |
Returns | ElementTag(Boolean) |
Description | Returns whether the list contains any of a list of given elements. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2586 |
Name | <ListTag.contains_any_case_sensitive[<element>|...]> |
Returns | ElementTag(Boolean) |
Description | Returns whether the list contains any of a list of given elements, case-sensitive. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2566 |
Name | <ListTag.contains_case_sensitive[<element>]> |
Returns | ElementTag(Boolean) |
Description | Returns whether the list contains a given element, case-sensitive. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2606 |
Name | <ListTag.contains_match[<matcher>]> |
Returns | ElementTag(Boolean) |
Description | Returns whether the list contains an object that matches the specified matcher,
using the system behind Advanced Object Matching. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2659 |
Name | <ListTag.contains_single[<element>]> |
Returns | ElementTag(Boolean) |
Description | Returns whether the list contains the given element. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2623 |
Name | <ListTag.count[<element>]> |
Returns | ElementTag(Number) |
Description | Returns how many times a value in the list occurs. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1738 |
Name | <ListTag.count_matches[<matcher>]> |
Returns | ElementTag(Number) |
Description | Returns how many times a value in the list matches the matcher,
using the system behind Advanced Object Matching, For example: a list of "one|two|three" .count[t*] returns 2. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1758 |
Name | <ListTag.deduplicate> |
Returns | ListTag |
Description | Returns a copy of the list with any duplicate items removed. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1515 |
Name | <ListTag.exclude[...|...]> |
Returns | ListTag |
Description | Returns a new ListTag excluding the items specified. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1313 |
Name | <ListTag.exclude_single[<value>]> |
Returns | ListTag |
Description | Returns a new ListTag excluding the items specified.
If your list contains sub-lists, this tag can cleanly remove them. Note that the "_single" refers to not taking a list of removables, it does still remove more than once instance of the value if present in the list. |
Example |
|
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1288 |
Name | <ListTag.exclude[...|...].max[<#>]> |
Returns | ListTag |
Description | Returns a new ListTag excluding the items specified. Specify a maximum number of items to remove from the list.
Max must be an integer >= 1. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1328 |
Name | <ListTag.filter[<tag>]> |
Returns | ListTag |
Description | Returns a copy of the list with all its contents parsed through the given tag and only including ones that returned 'true'.
One should generally prefer ListTag.filter_tag. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2330 |
Name | <ListTag.filter_tag[<dynamic-boolean>]> |
Returns | ListTag |
Description | Returns a copy of the list with all its contents parsed through the given input tag and only including ones that returned 'true'.
This requires a fully formed tag as input, making use of the 'filter_value' definition. |
Example |
|
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2430 |
Name | <ListTag.find[<element>]> |
Returns | ElementTag(Number) |
Description | Returns the numbered index of an entry within a list,
or -1 if the list does not contain that item. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1718 |
Name | <ListTag.find_all[<element>]> |
Returns | ListTag |
Description | Returns all the numbered indices of all entries that match the text within a list,
or an empty list if the list does not contain that item. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1656 |
Name | <ListTag.find_all_matches[<matcher>]> |
Returns | ListTag |
Description | Returns all the numbered indices of elements that match within a list,
using the system behind Advanced Object Matching, or an empty list if the list does not contain that item. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1633 |
Name | <ListTag.find_all_partial[<element>]> |
Returns | ListTag |
Description | Returns all the numbered locations of elements that contain the text within a list,
or an empty list if the list does not contain that item. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1612 |
Name | <ListTag.find_match[<matcher>]> |
Returns | ElementTag(Number) |
Description | Returns the numbered index of the first match within a list,
using the system behind Advanced Object Matching, or -1 if the list does not contain that item. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1697 |
Name | <ListTag.find_partial[<element>]> |
Returns | ElementTag(Number) |
Description | Returns the numbered index of the first partially matching entry within a list,
or -1 if the list does not contain that item. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1677 |
Name | <ListTag.first[(<#>)]> |
Returns | ObjectTag |
Description | Returns the first element in the list.
If the list is empty, returns null instead. Effectively equivalent to .get[1] Optionally, specify a number of entries to get, which will return the # first entries, equivalent to .get[1].to[#] |
Example |
|
Example |
|
Example |
|
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1825 |
Name | <ListTag.formatted> |
Returns | ElementTag |
Description | Returns the list in a human-readable format.
Note that this will parse the values within the list to be human-readable as well when possible. EG, a list of "<npc>|<player>|potato" will return "GuardNPC, bob, and potato". The exact formatting rules that will be followed are not guaranteed, other than that it will be a semi-clean human-readable format. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/bukkit/BukkitListExtensions.java#L20 |
Name | <ListTag.get[<#>|...]> |
Returns | ObjectTag |
Description | Returns an element of the value specified by the supplied context.
Specify more than one index to get a list of results. Note the index input options described at listtag |
Example |
|
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1528 |
Name | <ListTag.get_sub_items[<#>]> |
Returns | ListTag |
Description | Returns a list of the specified sub items in the list, as split by the
forward-slash character (/). |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L848 |
Name | <ListTag.get_sub_items[<#>].split_by[<element>]> |
Returns | ListTag |
Description | Returns a list of the specified sub item in the list, allowing you to specify a
character in which to split the sub items by. WARNING: When setting your own split character, make note that it is CASE SENSITIVE. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L864 |
Name | <ListTag.get[<#>].to[<#>]> |
Returns | ListTag |
Description | Returns all elements in the range from the first index to the second.
Note the index input options described at listtag |
Example |
|
Example |
|
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1568 |
Name | <ListTag.highest[(<tag>)]> |
Returns | ObjectTag |
Description | Returns the highest value in a list of decimal numbers.
Optionally specify a tag to run on each list entry that returns the numeric value for that entry. |
Example |
|
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2007 |
Name | <ListTag.highest[(<tag>)].count[<#>]> |
Returns | ListTag |
Description | Returns a list of the highest values in a list of decimal numbers.
Optionally specify a tag to run on each list entry that returns the numeric value for that entry. Note: if you want to sort the entire list, rather than just getting a few values, use a sort tag like listtag.sort_by_number |
Example |
|
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2034 |
Name | <ListTag.include[...|...]> |
Returns | ListTag |
Description | Returns a new ListTag including the items specified. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1273 |
Name | <ListTag.include_single[<value>]> |
Returns | ListTag |
Description | Returns a new ListTag including the value specified as a new entry.
If the value input is a list, that list becomes a list-within-a-list, still only occupying one space in the outer list. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1260 |
Name | <ListTag.insert_single[...|...].at[<#>]> |
Returns | ListTag |
Description | Returns a new ListTag with the single item specified inserted to the specified location.
Note the index input options described at listtag |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1111 |
Name | <ListTag.insert[...|...].at[<#>]> |
Returns | ListTag |
Description | Returns a new ListTag with the items specified inserted to the specified location.
Note the index input options described at listtag |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1078 |
Name | <ListTag.is_empty> |
Returns | ElementTag(Boolean) |
Description | Returns whether the list is empty. |
Example |
|
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1042 |
Name | <ListTag.last[(<#>)]> |
Returns | ObjectTag |
Description | Returns the last element in the list.
If the list is empty, returns null instead. Effectively equivalent to .get[<[list].size>] Optionally, specify a number of entries to get, which will return the # first entries, equivalent to .get[<[size].sub[#]>].to[last] |
Example |
|
Example |
|
Example |
|
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1866 |
Name | <ListTag.lowest[(<tag>)]> |
Returns | ObjectTag |
Description | Returns the smallest value in a list of decimal numbers.
Optionally specify a tag to run on each list entry that returns the numeric value for that entry. |
Example |
|
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1906 |
Name | <ListTag.lowest[(<tag>)].count[<#>]> |
Returns | ListTag |
Description | Returns a list of the smallest values in a list of decimal numbers.
Optionally specify a tag to run on each list entry that returns the numeric value for that entry. Note: if you want to sort the entire list, rather than just getting a few values, use a sort tag link listtag.sort_by_number |
Example |
|
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1933 |
Name | <ListTag.map_with[<value>|...]> |
Returns | MapTag |
Description | Interprets this list as a list of keys, and the input as a list of values,
and forms a mapping from keys to values based on list index. Both lists must have the same size. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1006 |
Name | <ListTag.merge_maps> |
Returns | MapTag |
Description | If this list is a list of MapTags, returns a single MapTag of all the maps combined together.
So a list that contains map of [a=1;b=2] and a map of [x=3;y=4] will return a single map of [a=1;b;=2;x=3;y=4] Duplicate keys will have the the last value that appears in the list. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L959 |
Name | <ListTag.numerical> |
Returns | ListTag |
Description | Returns the list sorted to be in numerical order. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2105 |
Name | <ListTag.overwrite[...|...].at[<#>]> |
Returns | ListTag |
Description | Returns a new ListTag with the index specified and beyond replaced with the input list.
The result list will be the same size as the original list, unless (input_list.size + at_index) is greater than the original list size. Note the index input options described at listtag |
Example |
|
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1215 |
Name | <ListTag.pad_left[<#>]> |
Returns | ListTag |
Description | Returns a ListTag extended to reach a minimum specified length by adding entries to the left side. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2494 |
Name | <ListTag.pad_left[<#>].with[<element>]> |
Returns | ListTag |
Description | Returns a ListTag extended to reach a minimum specified length by adding a specific entry to the left side. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2504 |
Name | <ListTag.pad_right[<#>]> |
Returns | ListTag |
Description | Returns a ListTag extended to reach a minimum specified length by adding entries to the right side. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2521 |
Name | <ListTag.pad_right[<#>].with[<element>]> |
Returns | ListTag |
Description | Returns a ListTag extended to reach a minimum specified length by adding a specific entry to the right side. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2531 |
Name | <ListTag.parse[<tag>]> |
Returns | ListTag |
Description | Returns a copy of the list with all its contents parsed through the given tag.
One should generally prefer ListTag.parse_tag. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2371 |
Name | <ListTag.parse_tag[<parseable-value>]> |
Returns | ListTag |
Description | Returns a copy of the list with all its contents parsed through the given tag.
This requires a fully formed tag as input, making use of the 'parse_value' definition. |
Example |
|
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2463 |
Name | <ListTag.random[(<#>)]> |
Returns | ObjectTag |
Description | Gets a random item in the list and returns it.
Optionally, add [<#>] to instead get a list of multiple randomly chosen list entries. |
Example |
|
Example |
|
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2676 |
Name | <ListTag.remove[<#>|...]> |
Returns | ListTag |
Description | Returns a new ListTag excluding the items at the specified index.
Note the index input options described at listtag |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1358 |
Name | <ListTag.remove[<#>].to[<#>]> |
Returns | ListTag |
Description | Returns a new ListTag excluding the items in the specified index range.
Note the index input options described at listtag |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1371 |
Name | <ListTag.replace[(regex:)<element>]> |
Returns | ListTag |
Description | Returns the list with all instances of an element removed.
Specify regex: at the start of the replace element to replace elements that match the Regex. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1436 |
Name | <ListTag.replace[(regex:)<element>].with[<element>]> |
Returns | ListTag |
Description | Returns the list with all instances of an element replaced with another.
Specify regex: at the start of the replace element to replace elements that match the Regex. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1444 |
Name | <ListTag.reverse> |
Returns | ListTag |
Description | Returns a copy of the list, with all items placed in opposite order. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1500 |
Name | <ListTag.separated_by[<text>]> |
Returns | ElementTag |
Description | Returns the list formatted, with each item separated by the defined text. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L800 |
Name | <ListTag.set_single[<value>].at[<#>]> |
Returns | ListTag |
Description | Returns a new ListTag with the single item specified inserted to the specified location, replacing the object already at that location.
Note the index input options described at listtag |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1181 |
Name | <ListTag.set[...|...].at[<#>]> |
Returns | ListTag |
Description | Returns a new ListTag with the items specified inserted to the specified location, replacing the object already at that location.
Note the index input options described at listtag |
Example |
|
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1142 |
Name | <ListTag.shared_contents[...|...]> |
Returns | ListTag |
Description | Returns a list of only items that appear in both this list and the input one.
This will also inherently deduplicate the output as part of processing. This will retain the list order of the list object the tag is on (so, for example "a|b|c" .shared_contents[c|b] returns "b|c"). |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1415 |
Name | <ListTag.size> |
Returns | ElementTag(Number) |
Description | Returns the size of the list. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1029 |
Name | <ListTag.sort[<procedure>]> |
Returns | ListTag |
Description | Returns a list sorted according to the return values of a procedure.
The <procedure> should link a procedure script that takes two definitions each of which will be an item in the list, and returns -1, 0, or 1 based on whether the second item should be added. EG, if a procedure with definitions "one" and "two" returned -1, it would place "two" after "one". Note that this uses some complex internal sorting code that could potentially throw errors if the procedure does not return consistently - EG, if "one" and "two" returned 1, but "two" and "one" returned 1 as well - obviously, "two" can not be both before AND after "one"! Note that the script should ALWAYS return -1, 0, or 1, or glitches could happen! Note that if two inputs are exactly equal, the procedure should always return 0. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2252 |
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#L2198 |
Name | <ListTag.sort_by_value[<tag>]> |
Returns | ListTag |
Description | Returns a copy of the list, sorted alphanumerically.
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 their names, via .sort_by_value[name] on the list of valid players. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2161 |
Name | <ListTag.sort[<procedure>].context[<context>]> |
Returns | ListTag |
Description | Sort a list, with context. See ListTag.sort[<procedure>] for general sort details. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2274 |
Name | <ListTag.space_separated> |
Returns | ElementTag |
Description | Returns the list in a cleaner format, separated by spaces. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L784 |
Name | <ListTag.sub_lists[<#>]> |
Returns | ListTag(ListTag) |
Description | Returns a list containing sublists of this list capped to a specific length. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L757 |
Name | <ListTag.sum> |
Returns | ElementTag(Decimal) |
Description | Returns the sum of all numbers in the list. Ignores non-numerical values. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1779 |
Name | <ListTag.to_map[(<separator>)]> |
Returns | MapTag |
Description | Interprets a list of "key/value" pairs as a map, and returns the resulting MapTag.
Optionally specify the map separator symbol, by default '/'. Inverted by MapTag.to_list |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L980 |
Name | <ListTag.to_polygon> |
Returns | PolygonTag |
Description | Converts a list of locations to a PolygonTag.
The Y-Min and Y-Max values will be assigned based the range of Y values in the locations given. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/bukkit/BukkitListExtensions.java#L89 |
Name | <ListTag.unseparated> |
Returns | ElementTag |
Description | Returns the list in a less clean format, separated by nothing. |
Example |
|
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L832 |