Solved Help with PlaceholderAPI JavaScript

Discussion in 'Spigot Plugin Help' started by baileyiscoolwow, Jun 29, 2018.

  1. Hi, I wanted to know if this is possible? A way to show how many tags, pets or whatever you own in DeluxeMenus using PlaceholderAPI using JavaScript or other.

    Example: (https://i.imgur.com/7XunpT2.png so if the image doesn't load).
    [​IMG]

    I know most servers using this are custom plugins but I've seen a couple servers using DeluxeMenus or BossShopPro doing this.

    If anyone can help me out that would be great thanks.
     
    #1 baileyiscoolwow, Jun 29, 2018
    Last edited: Jun 29, 2018
  2. They are probably using 2 placeholders..
    so for example: &e(%player_tags%/%max_tags%)
     
  3. These are not preset placeholders and won't work. I'm looking for something that will count up for every permission they own. I think you can do this using the JavaScript Expansion but I don't know how.
     
  4. Well you could always use player.getEffectivePermissions() and then iterate over that list and count how many starts with the permission your looking for
     
  5. Can I get more information about this and how I could put this into a javascript? Thanks.
     
  6. Why are you trying to use JavaScript? Are you trying to display information from your minecraft server on a web page?
    Or do you mean to say Java.
     
  7. Well if you want to you can try to get it done with that but you can also make your own placeholder expansion for placeholder API
    and you can either hook into the plugin you want and you can get information from that plugin or you could do it the way or find out from the permissions.
    I'm a little confused, Do you know Java and the SpigotAPI? or do you only know JavaScript?
     
  8. Chances are if they’re using custom plugins they’ve registered their own placeholders using the PlaceholderAPI - API.
    If not you could look into deluxetags which is supported (same developer)
     
  9. But I want this to work not only for tags but for pets, trails and whatever else. These other servers that use a custom plugin probably have it built into the plugin so the use of PlaceholderAPI wouldn't be needed.
     
  10. Yeah they will use methods to create the gui with information from their own plugin rather than making placeholders then using them.
    If you want to do the same kind of thing with DeluxeMenus you will have to either create your own placeholders or you could ask the dev of the pets, trails.. plugin to add placeholders.
     
  11. Found out how to do this, thanks to all who tried to help.