Name | <ObjectTag.is_truthy> |
Returns | ElementTag(Boolean) |
Description | Returns 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. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/CoreObjectTags.java#L127 |