#(cattamer19) Efficient way of getting playertag through name
23 messages · Page 1 of 1 (latest)
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
!t objecttag.if_null
If the object is null (or the tag errors), this will return the input object.
If the object isn't null, the input won't be parsed, and the original object will be returned.
For example, "<player.if_null[<npc>]>" will return the player if there is a player, and otherwise will return the NPC.
This functions as a fallback - meaning, if the tag up to this point errors, that error will be hidden.
ObjectTag
Returns true if the object exists (is non-null). Returns false if the object doesn't exist, is null, or the tag errored.
This functions as a fallback - meaning, if the tag up to this point errors, that error will be hidden.
ElementTag(Boolean)
Some individuals use the tag is_truthy but I'm not familiar enough to tell you if it's appropriate for this.
!t is_truthy
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 log...
ElementTag(Boolean)
Thread closed as resolved.
uh oops
Thread was manually reopened by @static depot.
Thread closed as resolved.
Thread was manually reopened by @static depot.
Thread was manually reopened by @static depot.
Thread closed as resolved.
what
Thread was manually reopened by @static depot.
why is it reopening