Closed TobyMinceraft closed 4 years ago
This should be possible. Do you encounter any errors on script reload or in console when trying to do this, or does it just not work?
It just doesn't work. No errors. The placeholders just show up as (in my example) "server_versions" and "server_ip", respectively
I will look into this and get back to you soon.
Can you also respond with the following when you get a chance? Thanks :)
Skript version: 2.4 skript-placeholders version: 1.3 PAPI version: 2.10.3 Server version: 1.14.4 Server platform: git-Paper-175 (MC: 1.14.4)
EDIT: I see you updated the plugin last Tuesday; can't test it now, but will tomorrow
I was unable to replicate this issue in testing. Are you trying to put these placeholders on a scoreboard plugin or something else?
If you want to try updating to see if that fixes your issues, I am using: PlaceholderAPI 2.10.4 Paper 1.14.4 git-Paper-230 skript-placeholders 1.3.1 Skript 2.4
I am using the latest versions of those plugins, and have updated Paper to the latest as well, but I am still getting the same issue. Yes, I am using an infoboard to show these values, specifically InfoBoardReborn, as described in my original comment
I'm thinking this may be an issue with PlaceholderAPI? I am still unable to reproduce, but I will continue to investigate.
Been a while since I posted something. I've done some more research, and found the solution: there's already a PAPI expansion (in use by me) that has "server" as it's prefix. So instead, I changed my "server_versions" and "server_ip" to show "myserver_versions" and "myserver_ip", respectively. This solved my issue. With PAPI and its users coming out with more and more expansions, it'll be hard to know whether a placeholder we users have made will break upon installing a new expansion, so we'll have to be careful.
TL;DR This is no longer a bug, just something I under-looked.
This is kinda a bug as well, but only a minor setback. When creating a custom placeholder, the placeholder request only allows 1 identifier per prefix, which I feel shouldn't be a thing.
Example:
on papi placeholder request for the prefix "server": if the identifier is "versions": set the result to "[1.9x - 1.15x]"
I know some infoboard plugins, such as that of InfoBoardReborn by Pixar02, allows for custom placeholders by its own plugin (in my example, it would be ""), but that's not my point. With how skript-placeholders currently handles the identifiers, I would have to create a new prefix for each new identifier, rather than combining them together. Here's an example to what I'd like to see:
on papi placeholder request for the prefix "server": if the identifier is "versions": set the result to "[1.9x - 1.15]" else if the identifier is "ip": set the result to "play.risingdawn.fun"
Of course, this is correct formatting and code for Skript, but not the skript-placeholders plugin. Not sure if that's something that would need to be updated in PAPI, Skript, or skript-placeholders, but it's something that would greatly help. For now, here's what I would need to do:`on papi placeholder request for the prefix "server1": if the identifier is "versions": set the result to "[1.9x - 1.15x]"
on papi placeholder request for the prefix "server2": if the identifier is "ip": set the result to "play.risingdawn.fun"`