1. 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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Addon Ersatz 1.0

Make your own PlaceholderAPI placeholders with Skript

  1. Pikachu

    Moderator Supporter Addon Developer

    Joined:
    Jan 25, 2017
    Messages:
    871
    Likes Received:
    134
    Medals:
    Pikachu submitted a new resource:

    Ersatz - Make your own PlaceholderAPI placeholders with Skript

    Read more about this resource...
     
  2. ELROX

    ELROX Active Member

    Joined:
    Jan 26, 2017
    Messages:
    30
    Likes Received:
    1
    Placeholders created with this addon can be used in other plugins that have placeholderapi implemented? or only can be used in scripts?
     
  3. Pikachu

    Moderator Supporter Addon Developer

    Joined:
    Jan 25, 2017
    Messages:
    871
    Likes Received:
    134
    Medals:
    They can be used in any PlaceholderAPI compatible plugin
     
    • Like Like x 1
  4. ayoungcoder

    ayoungcoder Member

    Joined:
    Aug 23, 2017
    Messages:
    17
    Likes Received:
    1
    is %player% in the placeholder request the viewer or the relational person its parsed for? if its the viewer, can you add support for this but also for the relational person if it is called with a relational person? (like player views message from tablist and wants to see the color of that persons name, not the player's color)

    edit for reference: it is already relational
     
    #4 ayoungcoder, May 1, 2018
    Last edited: May 1, 2018
  5. Pikachu

    Moderator Supporter Addon Developer

    Joined:
    Jan 25, 2017
    Messages:
    871
    Likes Received:
    134
    Medals:
    The player is whatever PlaceholderAPI provides me as the player. Usually, this is the person viewing the placeholder, however, I do not have control over what this value is.
     
  6. Ignte

    Ignte Member

    Joined:
    Jun 18, 2019
    Messages:
    1
    Likes Received:
    0
    > [13:45:34 INFO]: [Ersatz] Enabling Ersatz v1.0
    > [13:45:34 ERROR]: Error occurred while enabling Ersatz v1.0 (Is it up to date?)
    ch.njol.skript.SkriptAPIException: Registering is disabled after initialisation!
    at ch.njol.skript.Skript.checkAcceptRegistrations(Skript.java:908) ~[?:?]
    at ch.njol.skript.Skript.registerAddon(Skript.java:930) ~[?:?]
    at com.pikachu.papiaddon.Main.getAddonInstance(Main.java:41) ~[?:?]
    at com.pikachu.papiaddon.Main.onEnable(Main.java:26) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[server.jar:git-PaperSpigot-"4c7641d"]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:332) [server.jar:git-PaperSpigot-"4c7641d"]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:407) [server.jar:git-PaperSpigot-"4c7641d"]
    at com.rylinaux.plugman.util.PluginUtil.load(PluginUtil.java:366) [PlugMan.jar:?]
    at com.rylinaux.plugman.command.LoadCommand.execute(LoadCommand.java:114) [PlugMan.jar:?]
    at com.rylinaux.plugman.PlugManCommandHandler.onCommand(PlugManCommandHandler.java:95) [PlugMan.jar:?]
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) [server.jar:git-PaperSpigot-"4c7641d"]
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:146) [server.jar:git-PaperSpigot-"4c7641d"]
    at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(CraftServer.java:666) [server.jar:git-PaperSpigot-"4c7641d"]
    at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(PlayerConnection.java:1189) [server.jar:git-PaperSpigot-"4c7641d"]
    at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:1001) [server.jar:git-PaperSpigot-"4c7641d"]
    at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:45) [server.jar:git-PaperSpigot-"4c7641d"]
    at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:1) [server.jar:git-PaperSpigot-"4c7641d"]
    at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [server.jar:git-PaperSpigot-"4c7641d"]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_212]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_212]
    at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [server.jar:git-PaperSpigot-"4c7641d"]
    at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:774) [server.jar:git-PaperSpigot-"4c7641d"]
    at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:378) [server.jar:git-PaperSpigot-"4c7641d"]
    at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:713) [server.jar:git-PaperSpigot-"4c7641d"]
    at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:616) [server.jar:git-PaperSpigot-"4c7641d"]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]
    > [13:45:34 INFO]: [Ersatz] Disabling Ersatz v1.0


    not working
     
  7. Mattyb0i

    Mattyb0i Member

    Joined:
    Oct 19, 2017
    Messages:
    5
    Likes Received:
    0
    Hey. I try to add placeholders to a embed with Vixio, but my placeholders need a player. I also try using loop all players, but that doesn't seems to work. Can i do it on another way without looping all players or set the variables, when a player joins or something like that? It may not be Vixio, because when i try to use placeholders in a event like every x minutes, the placeholders need a player.
     
  8. TobyMinceraft

    TobyMinceraft Member

    Joined:
    Jul 21, 2019
    Messages:
    11
    Likes Received:
    1
    According to the devs of PlaceholderAPI (hereafter known as PAPI), the plugin needs updating. I am not using the latest version of PAPI, as I have not had the time to update it (though PAPI is not latest, it still gives this error). Here's the error it gives me:
    Code (Text):
    1.  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 can confirm that is the case.

    Side note: this is the only error that pops up concerning PAPI and Ersatz.
    --- Double Post Merged, Dec 4, 2019, Original Post Date: Dec 3, 2019 ---
    If it's a Discord command you are creating, it can't use player placeholders from a server, as the command (or event) is not being run from the server but the Discord. What you might be able to do is create a method that will save the player's name (preferably, their UUID) to a variable, and then call the variable. Here's an example:
    Code (Text):
    1. on join:
    2.         set {name.%player%} to player
    3.         if {%player's uuid%::*} doesn't contain {name.%player%}:
    4.                 add {name.%player%} to {%player's uuid%::*}
    This will not only set their playername to a variable, but also add their playername to a list variable, so you can see a list of the player's previous names. I hope this helped, as your statement was a bit confusing. An example of your code would've been helpful.
     
    #8 TobyMinceraft, Dec 4, 2019
    Last edited: Dec 7, 2019
    • Like Like x 1
  9. HippieSavage

    HippieSavage Member

    Joined:
    May 20, 2020
    Messages:
    1
    Likes Received:
    0
    I have this problem too. Plugin needs to change hooking method.
     
  10. MrCrazyKill

    MrCrazyKill Member

    Joined:
    Feb 20, 2017
    Messages:
    9
    Likes Received:
    0
    Use this fork of Ersatz : https://forums.skunity.com/resources/skript-placeholders.909/
     
Loading...