Development Assistance PlaceHolderAPI Custom Placeholder

Discussion in 'Plugin Help/Development/Requests' started by PaddyWagon, Mar 19, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    PaddyWagon

    Hello, I'm currently having an issue with a custom placeholder I'd like to make.

    My goal is to create a shop so that players may exchange $ for an additional plot, using plotsquared. To do this, I need to create a custom shop using DeluxeMenus, but the problem is that everyone has a different amount of plots, so I can't have the console execute something like : lp user {player} permission set plots.plot.2 because some people already have more than 2.

    So basically, I need to make a placeholder to retrieve the amount of plots a player has, and then add 1 to it, so that for the shop, the console could run lp user {player} permission set plots.plot.%javascript_add_Plot%

    I've made this placeholder:
    Code:
    add_Plot:
      expression: if (player.hasPermission("plots.use")) { var amount = player.getAllowedPlots() + 1; }
      type: number
    Since it doesn't work, I'd love it if I could get some help.

    Regards,
    Paddy
     
Thread Status:
Not open for further replies.

Share This Page