#(snozbear) Placeholder empty
40 messages · Page 1 of 1 (latest)
(snozbear) Placeholder empty
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 <placeholder.player>
Returns the value of the placeholder for the specified player.
Depenizen, PlaceholderAPI
ElementTag
It looks like it’s looking for a server placeholder, not an individual player placeholder
Oh that works lol, weirdly it works fine if theyre professed into a class but if they arent it just gives the raw thingy
Tysm!
Thread closed as resolved.
wait nm that doesnt work
Thread was manually reopened by @foggy moat.
I accidentally professed into a class
What?
Sorry, so the placeholder is empty until a player professes into a class. So when its empty I need it to return as 0, but currently it just gives me back the placeholder like %placeholder%
so, I was wondering if theres a way to get the placeholder to return null when its empty I guess
!t 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
Not sure how placeholders work.
<placeholder[fabled_player_Class_attribute:vitality].if_null[0]> returns as 0 when theyre professed into a class, but when they arent it just comes back as %fabled_player_Class_attribute:vitality%
Unfortunately that's probably more to do with how PAPI deals with placeholders - if it doesn't exist it just returns the raw placeholder text. You could always test whether the raw placeholder was returned
I see, rip. I'm trying to do it in an item's lore which makes it a bit more annoying
or maybe ill just make it so they can't open the menu if theyre not professed lmao
Do you have a way to tell if they are professed?
If so you could use ternary
!t tern
Multiple possible tags: <QuaternionTag.slerp[end=<quaternion>;amount=<amount>]>, <LocationTag.patterns>, <ItemTag.patterns>, <QuaternionTag.x>, <QuaternionTag.y>, <QuaternionTag.z>, <QuaternionTag.w>, <QuaternionTag.xyz>, <QuaternionTag.xyzw>, <QuaternionTag.plus[<quaternion>]>, <QuaternionTag.mul[<quaternion>]>, <QuaternionTag.scale[<factor>]>, <QuaternionTag.length>, <QuaternionTag.length>, <QuaternionTag.inverse>, <quaternion[<quaternion>]>, <QuaternionTag.negative>, <QuaternionTag.transform[<vector>]>, <LocationTag.lectern_page>, <QuaternionTag.normalize>, ...
yeah but its more placeholders lol
As long as that returns something always, that should be fine
!t tern.pass.fail
Returns either the 'pass' input, or 'fail' input depending on the outcome of the condition.
The 'pass' input will be returned when the condition returns 'true', otherwise the 'fail' input will be returned.
Example: '<tern[<player.is_spawned>].pass[Player is spawned!].fail[Player is not spawned!]>'
Consider instead using !tag ElementTag.if_true.if_false
ObjectTag
oh I see, alrighty I'll give that a whirl
If this element is 'true', returns the first given object. If it isn't 'true', returns the second given object.
If the input objects are tags, only the matching tag will be parsed.
For example: "<player.exists.if_true[<player.name>].if_false[server]>"
will return the player's name if there's a player present, or if not will return 'server', and won't show any errors from the '<player.name>' tag even without a player linked.
element checking
ObjectTag
Huh. Yeah that is neater. Knowledge increased. Thanks for pointing that out Aya 😄
Feel free to ask if you need any help, otherwise -
Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.
If not yet resolved, please reply below to tell us what you still need.
(Note that if there is no reply for a few days, this thread will eventually close itself.)
@foggy moat