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 1 out of 2484 tags...
Name<MapTag.contains[<key>|...]>
ReturnsElementTag(Boolean)
DescriptionReturns whether the map contains the specified key.
If a list is given as input, returns whether the map contains all of the specified keys.
Example
- if <map[a=1;b=2].contains[a]>:
    - narrate "Yep it sure does have 'a' as a key!"
Example
- if <map[a=1;b=2].contains[c]>:
    - narrate "This won't show"
- else:
    - narrate "No it doesn't have 'c'"
Example
# Narrates 'true'
- narrate <map[a=1;b=2].contains[a|b]>
Example
# Narrates 'false'
- narrate <map[a=1;b=2].contains[a|b|c]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/MapTag.java#L543