#Brain melt with placeholders and how they work

1 messages · Page 1 of 1 (latest)

compact coral
#

I am using ItsMyConfig to display two different strings dependent on whether the user is bedrock or java. As shown here:

custom-placeholder:
  glyph-playerprefix:
    value: 'b' # show this if viewer passed requirements
    requirements:
      isjava:
        type: "string equals ignorecolor "
        input: "%player_displayname%" 
        output: ".%player_displayname%"
        deny: "j<glyph:player>" # if viewer did not pass requirements show this (if viewer is java)

So I want to display value: if the user passes requirements. I want to display deny: if the user does not pass requirements.
I need some input that can parse the user, see if they're bedrock or not and if so display value: if bedrock or deny: if java.

What placeholder(s) could I use? I need some way to parse it for the viewer only, as for example, I don't want playerprefix to show value: to the target (bedrock) and value: to the viewer (java) and vice versa.
I thought maybe using utils_parseother:[name]_placeholder. I thought maybe just checking if player's displayname has a dot or not, but that doesn't seem like it'll work either.
So, what I'm getting at is how can I do something like this? Is anyone familiar enough to know what placeholders I could try to do this. I could use floodgate_isbedrock to see if it returns false or true but I still don't know how to handle the viewer / target thing.
If anyone has ideas or suggestions on easier ways to do this that'd be great.

#

Like in chat with luckperms I wouldn't want it to parse the player, see they are java and display deny (j<glyph:player>) then on bedrock have them, the viewer, see that output rather than value:
I thought maybe this is something to do with relational placeholders? But I really don't know how those work either or what is available to do something like this.

compact coral
#

maybe explained better:

  glyph-playerprefix:
    value: '<glyph:player>' # if java show this
    requirements:
      isjava:
        type: "string equals ignorecolor "
        input: "%utils_parseplaceholder:player_floodgate_isbedrock%"  # return player and whether they're bedrock
        output: "false" # if not bedrock return `value: '<glyph_player>'
        deny: "" # if bedrock (if output was true for them) return `deny: ""`
        # current problem with this setup is that it's not doing so for the VIEWER, so when a bedrock player is on their chat prefix will show the "deny" output and java players will see that on the bedrock user.
neat heart
#

So you shouldn't need to do anything using relational or utils expansion.

#

At most you might want to use the ChangeOutput expansion to show something for bedrock players and something else for java players

#

Something like this maybe:

%changeoutput_ignorecolor_input:{player_floodgate_isbedrock}_matcher:false_ifmatch:<glyph:player>_else:%

compact coral