Solved Skript Mirror Help

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Veraid

Member
Feb 8, 2017
25
8
3
28
Wasn't really sure if to post this in Skript help or Java help as it's a bit of a hybrid but I've learned about Skript-Mirror and I'm wanting to know how advanced it is, can you really do anything in it you would in a plugin? I have been testing it out and done something rather basic with it
Code:
import:
  me.clip.placeholderapi.PlaceholderAPI
expression papi [for] %player% [of] %string%:
  get:
    return PlaceholderAPI.setPlaceholders(expression-1 and "%%%expression-2%%%")
This creates a new expression papi [for] %player% [of] %string%, this allows you to check a placeholderapi placeholder, what I'm wanting to know is, is it possible to create a new placeholderapi placeholder using skript mirror? I haven't figured it out
 
I don't think so (someone correct me if I am wrong). To create placeholders in placeholderapi you have to create a placeholder class for the custom placeholders and register them in your plugin (and also register with placeholderapi). I don't know much about placeholderapi but after looking at how to create placeholders, I do not think it is possible with skript-mirror alone (once again, someone please correct me if I am wrong).

Your best bet would probably be to just use the Ersatz addon made by Pikachu.
https://forums.skunity.com/resources/ersatz.355/

If someone does find a way to do this with just skript-mirror, I would be pretty surprised.
 
I don't think so (someone correct me if I am wrong). To create placeholders in placeholderapi you have to create a placeholder class for the custom placeholders and register them in your plugin (and also register with placeholderapi). I don't know much about placeholderapi but after looking at how to create placeholders, I do not think it is possible with skript-mirror alone (once again, someone please correct me if I am wrong).

Your best bet would probably be to just use the Ersatz addon made by Pikachu.
https://forums.skunity.com/resources/ersatz.355/

If someone does find a way to do this with just skript-mirror, I would be pretty surprised.
I used to use ersatz but (at least last time I tested) it did not work on 1.15
 
I used to use ersatz but (at least last time I tested) it did not work on 1.15
Just tested Ersatz on the newest Skript version, newest paper 1.15.2 and the newest placeholderapi version and it worked fine. I pretty much used the example code from the Ersatz page.
code_language.skript:
on placeholder request with prefix "custom":
    if the identifier is "hey":
        set the result to "hi there %player%!"

command /getplaceholder:
    trigger:
        set {_p} to placeholder "custom_hey"
        broadcast {_p}
 
Just tested Ersatz on the newest Skript version, newest paper 1.15.2 and the newest placeholderapi version and it worked fine. I pretty much used the example code from the Ersatz page.
code_language.skript:
on placeholder request with prefix "custom":
    if the identifier is "hey":
        set the result to "hi there %player%!"

command /getplaceholder:
    trigger:
        set {_p} to placeholder "custom_hey"
        broadcast {_p}
Must have been updated since I last used it, I just tested ersatz and it worked fine I noticed someone did a fork of it as it previously wasn't updated for the latest version of placeholderapi https://forums.skunity.com/resources/skript-placeholders.909/ which I was going to try if ersatz still wasn't working but it is


[Edit]
After further testing there is still errors in console with Ersatz for the latest placeholderapi hook
[20:32:04] [Server thread/ERROR]: [PlaceholderAPI] Ersatz is currently using a deprecated method to hook into PlaceholderAPI. Placeholders for that plugin no longer work. Please consult [Pikachu] and urge them to update it ASAP.
I'm going to try the fork

[Edit2]
Fork works fine, try it out if you are hooking into placeholderapi
 
Last edited:
Status
Not open for further replies.