Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relational Placeholders #34

Open
ShaneBeee opened this issue Aug 16, 2022 · 3 comments
Open

Relational Placeholders #34

ShaneBeee opened this issue Aug 16, 2022 · 3 comments
Labels
completed Indicates that a bug is going to be fixed in an upcoming release. enhancement A feature request or pull request enhancing the addon.

Comments

@ShaneBeee
Copy link

Description

Someone on discord was talking about this, so I figured I'd suggest it.
If you could please add "Relational Placeholders" that would be great

https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/PlaceholderExpansion#relational-placeholders

@ShaneBeee ShaneBeee added the enhancement A feature request or pull request enhancing the addon. label Aug 16, 2022
@APickledWalrus
Copy link
Owner

Sure, I'll look into adding support for creating & obtaining them :)

@APickledWalrus
Copy link
Owner

Almost two years later, this will be coming in 1.7.0 lol

@APickledWalrus APickledWalrus added the completed Indicates that a bug is going to be fixed in an upcoming release. label May 24, 2024
@APickledWalrus
Copy link
Owner

APickledWalrus commented May 24, 2024

I have completed this and it will be coming in the next release. Here is an example of using it:

placeholderapi relational placeholder with the prefix "skriptplaceholders":
  if the identifier is "longer_name": # Placeholder is "%rel_skriptplaceholders_longer_name%":
    if the length of the name of the first player > the length of the name of the second player:
      set the result to the name of the first player
    else:
      set the result to the name of the second player

# Obtain it
the value of the relational placeholder "rel_skriptplaceholders_longer_name" for <some player> and <some other player>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed Indicates that a bug is going to be fixed in an upcoming release. enhancement A feature request or pull request enhancing the addon.
Projects
None yet
Development

No branches or pull requests

2 participants