mirror of
https://github.com/PlaceholderAPI/Javascript-Expansion.git
synced 2025-05-23 18:42:44 +00:00
Added scripts folderr
This commit is contained in:
parent
975cdf9e30
commit
8327f7e671
20
scripts/has_permission.js
Normal file
20
scripts/has_permission.js
Normal file
@ -0,0 +1,20 @@
|
||||
// create a variable and name it wantever you want like this
|
||||
// and use the placeholder you want, i'm using this one
|
||||
var haspermission = "%player_has_permission_permission.test%";
|
||||
|
||||
// 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 === "yes") {
|
||||
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();
|
Loading…
x
Reference in New Issue
Block a user