I took an example from the website https://github.com/PlaceholderAPI/Javascript-Expansion/wiki/Community-Scripts#has-permission and I replaced the placeholder there with the one that I will use, but not the example, not my code does not work, other javascript placeholder examples from this site work, I connected the file correctly, all the necessary dependencies are also there, the placeholder that I want to use in the script is also working
file code
// create a variable and name it wantever you want like this
// and use the placeholder you want, i'm using this one
var haspermission = "%checkitem_amount_mat:string%";
// create a function with the name you want
function permission() {
// if the haspermission variable that we created before return yes (true boolean)
// the js placeholder will return what we set in the return down
if (haspermission == 0) {
return "&aYou have the Test permission!";
}
// if the haspermission varibale wasnt true it will return what we set down
else {
return "&cYou don't have the Test permission!";
}
}
// by this we are calling the function to run
permission();```
the file is connected correctly, if you insert another code into it, it will work.
```js
example:
file: example.js
souls:
file: souls_tag.js```