Denizen Script Tags


Tags are always written with a <between these marks>, and are critical to scripts, as the primary way to read data.
Learn about how tags work in The Beginner's Guide.


Showing 74 out of 2425 tags...
Name<ListTag.alphabetical>
ReturnsListTag
DescriptionReturns the list sorted to be in alphabetical order.
Example
# Narrates a list of 'a|c|d|g|q'
- narrate "<list[c|d|q|a|g].alphabetical>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2146

Name<ListTag.alphanumeric>
ReturnsListTag
DescriptionReturns the list sorted to be in alphabetical/numerical order.
Example
# Narrates a list of 'a1|a10|b|c'
- narrate "<list[b|c|a10|a1].alphanumeric>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2131

Name<ListTag.any>
ReturnsElementTag(Boolean)
DescriptionReturns whether the list is not empty.
Example
- if <list.any>:
    - narrate "never shows"
- else:
    - narrate "ain't got any"
Example
- if <list[something].any>:
    - narrate "something's here!"
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1060

Name<ListTag.average>
ReturnsElementTag(Decimal)
DescriptionReturns the mean average of all numbers in the list. Ignores non-numerical values.
Example
# Narrates "3"
- narrate <list[1|2|4|5].average>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1798

Name<ListTag.closest_to[<text>]>
ReturnsElementTag
DescriptionReturns 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
# Narrates "spawn"
- narrate "<list[dance|quit|spawn].closest_to[spwn]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2718

Name<ListTag.combine>
ReturnsListTag
DescriptionReturns a list containing the contents of all sublists within this list.
Generated Example
- foreach <list[one|two].combine> as:entry:
    - narrate "found <[entry]>"
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L743

Name<ListTag.comma_separated>
ReturnsElementTag
DescriptionReturns the list in a cleaner format, separated by commas.
Example
# Narrates "one, two, three"
- narrate <list[one|two|three].comma_separated>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L816

Name<ListTag.contains[<element>|...]>
ReturnsElementTag(Boolean)
DescriptionReturns whether the list contains all of the given elements.
See also Tag:ListTag.contains_single for safer single-value checks.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2639

Name<ListTag.contains_any[<element>|...]>
ReturnsElementTag(Boolean)
DescriptionReturns whether the list contains any of a list of given elements.
Sourcehttps://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>|...]>
ReturnsElementTag(Boolean)
DescriptionReturns whether the list contains any of a list of given elements, case-sensitive.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2566

Name<ListTag.contains_case_sensitive[<element>]>
ReturnsElementTag(Boolean)
DescriptionReturns whether the list contains a given element, case-sensitive.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2606

Name<ListTag.contains_match[<matcher>]>
ReturnsElementTag(Boolean)
DescriptionReturns whether the list contains an object that matches the specified matcher,
using the system behind Language:Advanced Object Matching.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2659

Name<ListTag.contains_single[<element>]>
ReturnsElementTag(Boolean)
DescriptionReturns whether the list contains the given element.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2623

Name<ListTag.count[<element>]>
ReturnsElementTag(Number)
DescriptionReturns how many times a value in the list occurs.
Example
# Narrates "2"
- narrate <list[one|two|two|three].count[two]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1738

Name<ListTag.count_matches[<matcher>]>
ReturnsElementTag(Number)
DescriptionReturns how many times a value in the list matches the matcher,
using the system behind Language:Advanced Object Matching,
For example: a list of "one|two|three" .count[t*] returns 2.
Example
# Narrates "2"
- narrate <list[one|two|two|three].count_matches[t*]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1758

Name<ListTag.deduplicate>
ReturnsListTag
DescriptionReturns a copy of the list with any duplicate items removed.
Example
# Narrates a list of "one|two|three"
- narrate <list[one|one|two|three].deduplicate>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1515

Name<ListTag.exclude[...|...]>
ReturnsListTag
DescriptionReturns a new ListTag excluding the items specified.
Example
# Narrates a list of "one|three"
- narrate <list[one|two|three|four|two].exclude[two|four]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1313

Name<ListTag.exclude_single[<value>]>
ReturnsListTag
DescriptionReturns 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
# Narrates a list of "one|two|three|four", note how it does not remove anything here, as "two|three" does not appear as a *single* value in the list.
- narrate <list[one|two|three|four].exclude_single[two|three]>
Example
# Narrates a list of "three|four", with the single-entry "one|two" value removed.
- narrate <list_single[one|two].include[three|four].exclude_single[one|two]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1288

Name<ListTag.exclude[...|...].max[<#>]>
ReturnsListTag
DescriptionReturns 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
# Narrates a list of "taco|taco|taco|potato"
- narrate <list[taco|potato|taco|potato|taco|potato].exclude[potato].max[2]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1328

Name<ListTag.filter[<tag>]>
ReturnsListTag
DescriptionReturns 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 Tag:ListTag.filter_tag.
Example
# Narrates a list of '3|4|5'
- narrate <list[1|2|3|4|5].filter[is_more_than[3]]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2330

Name<ListTag.filter_tag[<dynamic-boolean>]>
ReturnsListTag
DescriptionReturns 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
# Narrates a list of '3|4|5'
- narrate <list[1|2|3|4|5].filter_tag[<[filter_value].is_more_than[3]>]>
Example
# Narrates a list of '4|5'
- narrate <list[1|2|3|4|5].filter_tag[<list[4|5].contains[<[filter_value]>]>]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2430

Name<ListTag.find[<element>]>
ReturnsElementTag(Number)
DescriptionReturns the numbered index of an entry within a list,
or -1 if the list does not contain that item.
Example
# Narrates "2"
- narrate <list[one|two|three].find[two]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1718

Name<ListTag.find_all[<element>]>
ReturnsListTag
DescriptionReturns 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
# Narrates a list of "2|4"
- narrate <list[one|two|three|two].find_all[two]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1656

Name<ListTag.find_all_matches[<matcher>]>
ReturnsListTag
DescriptionReturns all the numbered indices of elements that match within a list,
using the system behind Language:Advanced Object Matching,
or an empty list if the list does not contain that item.
Example
# Narrates a list of "2|3"
- narrate <list[one|two|three].find_all_matches[t*]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1633

Name<ListTag.find_all_partial[<element>]>
ReturnsListTag
DescriptionReturns 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
# Narrates a list of "2|4"
- narrate <list[one|two|three|two].find_all_partial[tw]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1612

Name<ListTag.find_match[<matcher>]>
ReturnsElementTag(Number)
DescriptionReturns the numbered index of the first match within a list,
using the system behind Language:Advanced Object Matching,
or -1 if the list does not contain that item.
Example
# Narrates "2"
- narrate <list[one|two|three].find_match[t*]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1697

Name<ListTag.find_partial[<element>]>
ReturnsElementTag(Number)
DescriptionReturns the numbered index of the first partially matching entry within a list,
or -1 if the list does not contain that item.
Example
# Narrates "2"
- narrate <list[one|two|three].find_partial[tw]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1677

Name<ListTag.first[(<#>)]>
ReturnsObjectTag
DescriptionReturns 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
# Narrates "one"
- narrate <list[one|two|three].first>
Example
# Narrates a list of "one" and "two"
- narrate <list[one|two|three].first[2]>
Example
# Narrates a list of "one", "two", and "three"
- narrate <list[one|two|three].first[5]>
Example
# Causes an error, as the list is empty.
- narrate <list.first>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1825

Name<ListTag.formatted>
ReturnsElementTag
DescriptionReturns 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
- narrate <list[one|two].formatted>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/bukkit/BukkitListExtensions.java#L20

Name<ListTag.get[<#>|...]>
ReturnsObjectTag
DescriptionReturns 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 ObjectType:listtag
Example
# Narrates "one"
- narrate <list[one|two|three].get[1]>
Example
# Narrates a list of "one|three"
- narrate <list[one|two|three].get[1|3]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1528

Name<ListTag.get_sub_items[<#>]>
ReturnsListTag
DescriptionReturns a list of the specified sub items in the list, as split by the
forward-slash character (/).
Example
# Narrates a list of "one|two"
- narrate <list[one/alpha|two/beta].get_sub_items[1]>
Sourcehttps://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>]>
ReturnsListTag
DescriptionReturns 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
# Narrates a list of "one|two"
- narrate <list[one-alpha|two-beta].get_sub_items[1].split_by[-]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L864

Name<ListTag.get[<#>].to[<#>]>
ReturnsListTag
DescriptionReturns all elements in the range from the first index to the second.
Note the index input options described at ObjectType:listtag
Example
# Narrates a list of "one|two|three"
- narrate <list[one|two|three|four].get[1].to[3]>
Example
# Narrates a list of "three|four"
- narrate <list[one|two|three|four].get[3].to[last]>
Example
# Narrates a list of "three|four"
- narrate <list[one|two|three|four].get[-2].to[-1]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1568

Name<ListTag.highest[(<tag>)]>
ReturnsObjectTag
DescriptionReturns 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
# Narrates '10'
- narrate "<list[3|2|1|10].highest>
Example
# Narrates the name of the player with the most money currently online
- narrate <server.online_players.highest[money].name>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2007

Name<ListTag.highest[(<tag>)].count[<#>]>
ReturnsListTag
DescriptionReturns 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 Tag:listtag.sort_by_number
Example
# Narrates a list of '10|3'
- narrate "<list[3|2|1|10].highest.count[2]>
Example
# Narrates the names of the 5 players with the most money currently online
- narrate <server.online_players.highest[money].count[5].parse[name].formatted>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2034

Name<ListTag.include[...|...]>
ReturnsListTag
DescriptionReturns a new ListTag including the items specified.
Example
# Narrates a list of "one|two|three|four"
- narrate <list[one|two].include[three|four]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1273

Name<ListTag.include_single[<value>]>
ReturnsListTag
DescriptionReturns 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.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1260

Name<ListTag.insert_single[...|...].at[<#>]>
ReturnsListTag
DescriptionReturns a new ListTag with the single item specified inserted to the specified location.
Note the index input options described at ObjectType:listtag
Example
# Narrates a list with 3 values: "one", "two|alsotwo", "three"
- narrate <list[one|three].insert_single[two|alsotwo].at[2]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1111

Name<ListTag.insert[...|...].at[<#>]>
ReturnsListTag
DescriptionReturns a new ListTag with the items specified inserted to the specified location.
Note the index input options described at ObjectType:listtag
Example
# Narrates a list of "one|two|three|four"
- narrate <list[one|four].insert[two|three].at[2]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1078

Name<ListTag.is_empty>
ReturnsElementTag(Boolean)
DescriptionReturns whether the list is empty.
Example
- if <list[something].is_empty>:
    - narrate "never shows"
- else:
    - narrate "it ain't empty!"
Example
- if <list.is_empty>:
    - narrate "it empty!"
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1042

Name<ListTag.last[(<#>)]>
ReturnsObjectTag
DescriptionReturns 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
# Narrates "three"
- narrate <list[one|two|three].last>
Example
# Narrates a list of "two" and "three"
- narrate <list[one|two|three].last[2]>
Example
# Narrates a list of "one", "two", and "three"
- narrate <list[one|two|three].last[5]>
Example
# Causes an error, as the list is empty.
- narrate <list.last>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1866

Name<ListTag.lowest[(<tag>)]>
ReturnsObjectTag
DescriptionReturns 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
# Narrates '1'
- narrate "<list[3|2|1|10].lowest>
Example
# Narrates the name of the player with the least money currently online
- narrate <server.online_players.lowest[money].name>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1906

Name<ListTag.lowest[(<tag>)].count[<#>]>
ReturnsListTag
DescriptionReturns 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 Tag:listtag.sort_by_number
Example
# Narrates a list of '1|2'
- narrate "<list[3|2|1|10].lowest.count[2]>
Example
# Narrates the names of the 5 players with the least money currently online
- narrate <server.online_players.lowest[money].count[5].parse[name].formatted>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1933

Name<ListTag.map_with[<value>|...]>
ReturnsMapTag
DescriptionInterprets 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
# Narrates a map of "[a=1;b=2;c=3]"
- narrate <list[a|b|c].map_with[1|2|3|]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1006

Name<ListTag.merge_maps>
ReturnsMapTag
DescriptionIf 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
- foreach <list[one|two].merge_maps> key:key as:val:
    - narrate "<[key]> is set as <[val]>"
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L959

Name<ListTag.numerical>
ReturnsListTag
DescriptionReturns the list sorted to be in numerical order.
Example
# Narrates a list of '1|2|3|10'
- narrate "<list[3|2|1|10].numerical>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2105

Name<ListTag.overwrite[...|...].at[<#>]>
ReturnsListTag
DescriptionReturns 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 ObjectType:listtag
Example
# Narrates a list of "one|potato|taco|four"
- narrate <list[one|two|three|four].overwrite[potato|taco].at[2]>
Example
# Narrates a list of "one|potato|taco|hotdog|cheeseburger"
- narrate <list[one|two|three].overwrite[potato|taco|hotdog|cheeseburger].at[2]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1215

Name<ListTag.pad_left[<#>]>
ReturnsListTag
DescriptionReturns a ListTag extended to reach a minimum specified length by adding entries to the left side.
Generated Example
- foreach <list[one|two].pad_left[4]> as:entry:
    - narrate "found <[entry]>"
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2494

Name<ListTag.pad_left[<#>].with[<element>]>
ReturnsListTag
DescriptionReturns a ListTag extended to reach a minimum specified length by adding a specific entry to the left side.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2504

Name<ListTag.pad_right[<#>]>
ReturnsListTag
DescriptionReturns a ListTag extended to reach a minimum specified length by adding entries to the right side.
Generated Example
- foreach <list[one|two].pad_right[2]> as:entry:
    - narrate "found <[entry]>"
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2521

Name<ListTag.pad_right[<#>].with[<element>]>
ReturnsListTag
DescriptionReturns a ListTag extended to reach a minimum specified length by adding a specific entry to the right side.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2531

Name<ListTag.parse[<tag>]>
ReturnsListTag
DescriptionReturns a copy of the list with all its contents parsed through the given tag.
One should generally prefer Tag:ListTag.parse_tag.
Example
# Narrates a list of 'ONE|TWO'
- narrate <list[one|two].parse[to_uppercase]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2371

Name<ListTag.parse_tag[<parseable-value>]>
ReturnsListTag
DescriptionReturns 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
# Narrates a list of 'ONE|TWO'
- narrate <list[one|two].parse_tag[<[parse_value].to_uppercase>]>
Example
# Narrates a list of 'charlie|alpha|bravo'
- narrate <list[3|1|2].parse_tag[<list[alpha|bravo|charlie].get[<[parse_value]>]>]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2463

Name<ListTag.random[(<#>)]>
ReturnsObjectTag
DescriptionGets a random item in the list and returns it.
Optionally, add [<#>] to instead get a list of multiple randomly chosen list entries.
Example
# Narrates EITHER "one" OR "two" - different each time!
- narrate "<list[one|two].random>
Example
# Could narrate "one|two", "two|three", OR "one|three" - different each time!
- narrate "<list[one|two|three].random[2]>
Example
# Could narrate "one|two|three", "one|three|two", "two|one|three", "two|three|one", "three|two|one", OR "three|one|two" - different each time!
- narrate "<list[one|two|three].random[9999]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2676

Name<ListTag.remove[<#>|...]>
ReturnsListTag
DescriptionReturns a new ListTag excluding the items at the specified index.
Note the index input options described at ObjectType:listtag
Example
# Narrates a list of "one|three|four"
- narrate <list[one|two|three|four].remove[2]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1358

Name<ListTag.remove[<#>].to[<#>]>
ReturnsListTag
DescriptionReturns a new ListTag excluding the items in the specified index range.
Note the index input options described at ObjectType:listtag
Example
# Narrates a list of "one|five"
- narrate <list[one|two|three|four|five].remove[2].to[4]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1371

Name<ListTag.replace[(regex:)<element>]>
ReturnsListTag
DescriptionReturns 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.
Sourcehttps://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>]>
ReturnsListTag
DescriptionReturns 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.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1444

Name<ListTag.reverse>
ReturnsListTag
DescriptionReturns a copy of the list, with all items placed in opposite order.
Example
# Narrates a list of "three|two|one"
- narrate <list[one|two|three].reverse>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1500

Name<ListTag.separated_by[<text>]>
ReturnsElementTag
DescriptionReturns the list formatted, with each item separated by the defined text.
Example
# Narrates "bob and joe and john"
- narrate "<list[bob|joe|john].separated_by[ and ]>"
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L800

Name<ListTag.set_single[<value>].at[<#>]>
ReturnsListTag
DescriptionReturns 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 ObjectType:listtag
Example
# Narrates a list with 3 values: "one", "potato|taco", "three"
- narrate <list[one|two|three].set_single[potato|taco].at[2]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1181

Name<ListTag.set[...|...].at[<#>]>
ReturnsListTag
DescriptionReturns 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 ObjectType:listtag
Example
# Narrates a list of "one|potato|three"
- narrate <list[one|two|three].set[potato].at[2]>
Example
# Narrates a list of "one|potato|taco|hotdog|three"
- narrate <list[one|two|three].set[potato|taco|hotdog].at[2]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1142

Name<ListTag.shared_contents[...|...]>
ReturnsListTag
DescriptionReturns 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
# Narrates a list of "two|four"
- narrate <list[one|two|three|four].shared_contents[two|four|five|six]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1415

Name<ListTag.size>
ReturnsElementTag(Number)
DescriptionReturns the size of the list.
Example
# Narrates '3'
- narrate <list[one|two|three].size>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1029

Name<ListTag.sort[<procedure>]>
ReturnsListTag
DescriptionReturns 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.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2252

Name<ListTag.sort_by_number[<tag>]>
ReturnsListTag
DescriptionReturns 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.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2198

Name<ListTag.sort_by_value[<tag>]>
ReturnsListTag
DescriptionReturns 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.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2161

Name<ListTag.sort[<procedure>].context[<context>]>
ReturnsListTag
DescriptionSort a list, with context. See Tag:ListTag.sort[<procedure>] for general sort details.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2274

Name<ListTag.space_separated>
ReturnsElementTag
DescriptionReturns the list in a cleaner format, separated by spaces.
Example
# Narrates "one two three"
- narrate <list[one|two|three].space_separated>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L784

Name<ListTag.sub_lists[<#>]>
ReturnsListTag(ListTag)
DescriptionReturns a list containing sublists of this list capped to a specific length.
Example
# Narrates "a|b", then "c|d", then "e|f"
- foreach <list[a|b|c|d|e|f].sub_lists[2]> as:sublist:
    - narrate <[sublist]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L757

Name<ListTag.sum>
ReturnsElementTag(Decimal)
DescriptionReturns the sum of all numbers in the list. Ignores non-numerical values.
Example
# Narrates "6"
- narrate <list[1|2|3].sum>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1779

Name<ListTag.to_map[(<separator>)]>
ReturnsMapTag
DescriptionInterprets a list of "key/value" pairs as a map, and returns the resulting MapTag.
Optionally specify the map separator symbol, by default '/'.
Inverted by Tag:MapTag.to_list
Generated Example
- foreach <list[one|two].to_map> key:key as:val:
    - narrate "<[key]> is set as <[val]>"
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L980

Name<ListTag.to_polygon>
ReturnsPolygonTag
DescriptionConverts 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
- note <list[one|two].to_polygon> as:my_new_polygon
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/bukkit/BukkitListExtensions.java#L89

Name<ListTag.unseparated>
ReturnsElementTag
DescriptionReturns the list in a less clean format, separated by nothing.
Example
# Narrates "onetwothree"
- narrate <list[one|two|three].unseparated>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L832