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 2437 tags...
Name<ObjectTag.is_truthy>
ReturnsElementTag(Boolean)
DescriptionReturns true if the object is 'truthy'. An object is 'truthy' if it exists and is valid, and does not represent a concept like emptiness.
An empty list or an air item will return 'false'. Plaintext "null" or "false", an empty element, or a numeric zero will return 'false' as well.
Some object types may have their own logical implementations, for examples an EntityTag value is 'truthy' only if the entity it represents is spawned.
Errored/broken/invalid tags are also considered 'false' by this logic.
This functions as a fallback - meaning, if the tag up to this point errors, that error will be hidden.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/CoreObjectTags.java#L127