#placeholder-api
1 messages · Page 115 of 1
I'm back, so it also happened on the localhost :(.
ok
Any chances that you are avaible to test it?:(
uh
I don't have your placeholders
i was looking for one of mine (that used .includes)
didn't find one
Oof, can you create a random simple one? just to test if it works with .includes
var placeholder = "%luckperms_check_permission_access.spawn%";
function returnEmpty()
{
var changed = "";
if (placeholder == "Yes" && placeholder2 == "")
return "&aIt is permanent";
if (placeholder2 == "")
return "&cYou don't have";
if(placeholder2.includes("s"))
changed= placeholder2.replace("s", "&7Seconds");
if(placeholder2.includes("m"))
changed= placeholder2.replace("m", "&7Minutes&f");
if(placeholder2.includes("h"))
changed= placeholder2.replace("h", "&7Hours&f");
if(placeholder2.includes("d"))
changed= placeholder2.replace("d", "&7Days&f");
return changed;
}
returnEmpty();```
Shouldn't `changed=` be separated from the =? like `changed =`
Or is the same?
Hmm, should it be suggested then?
oh fuck
no you can't do it
need a different engine
fuck this look at this bullshit
String.prototype.includes is specified in ECMAScript 2015 ( ECMA-262 6th Edition). Nashorn engine implements ECMA-262 Edition 5.1)
nashorn uses 5.1 and includes needs 6
ffs so close
might be able to get it to work?
eh
nvm
rip
:((
ECMA5 doesn't have let or const, so good luck :)
?
:((
Let is for variable defined only in scope
I barely know how to use JavaScript and only wanted to finish that single javascript for my minecraft server since it uses it everywhere, so I will wait what Blitz says, and if he refuses to help, then I will just deal with the current javascript :(.
@turbid tide btw if you didn't see, includes doesn't work in nashorn engine
Also, don't use changed= "a"
?
Cause you are making the code think that changed= is a variable
really?
Hm..
I think that is still valid
By some points
Oh wait nvm what i said, they're still valid
Yeah probable, but cannot confirm since .includes crashes the console and won't let me test, I would need to take the .split way but idk how, I'm noobie :((
not crash, it spams a lots*
really?
Replace the changed
Huh? How can you test if it works on a Script Tester when you can't make the 2 first placeholders run the values that it should be supposed to show?
Replace the changed
sure
frosty with what
changed = changed.replace
with changed =
you don't wanna do what you're about to
you're gonna replace things you don't want to
there is a d in Seconds
the best way is split and build
If this is done, I will make sure this is submitted into the community javascripts xD
send a ss of what the expiry time looks like?
%luckperms_expiry_time_access.spawn%?
ya what's the format
Let me check my old Hangman script to check includes
#d #h #m #s the # would be a number, and if the number is 0 it will dissapear, an example (when 0 minutes):
10d 10h 30s
thienbao wym
lol
to see how you did it instead?
ah
it's easy
var placeholder2 = "%luckperms_expiry_time_access.spawn%";
var placeholder = "%luckperms_check_permission_access.spawn%";
function returnEmpty(){
if (placeholder == "Yes" && placeholder2 == "")
return "&aIt is permanent";
if (placeholder2 == "")
return "&cYou don't have";
return placeholder2.replace("s ", "&7Seconds ").replace("m ", "&7Minutes&f ").replace("h ", "&7Hours&f ")replace("d ", "&7Days&f ");
}
returnEmpty();
wait
ok try that
@odd jay
should work ez pz
Ok there we go
just go for whatever
Replace includes with contains if it fails
sure, will have in mind
would java just take it over? O.o
because contains isn't a thing for js strings
if discord doesn't fuck me over i could send the whole thing
when was contains added I see nothing about it online
Idk
but in some cases if you access a String as a Java object as a property of some input, you really have Java and would just call Java methods.
from online ^
so java does take it over
you know to fix it then @odd jay
i beleef
?tryandsee
discord is not a recommended editor
hi
it worked with everything except for seconds
PlaceholderAPI does it work directly in bungee?
sure
yes?
PlaceholderAPI does it work directly in bungee?
@austere hawk Not yet, but it's planned
it worked great! so now I wanted to fix something but Idk how.
So when you told me to remove the space on the "s" I did that, and realized then when the countdown runs and reach to second 0, it dissapears, and the number that comes after turns the first, in this case, the minutes, and since minutes have a space "m " it won't work for 1 second, it will also happen with hours and days
any possible way to fix that?
also, is it possible to make it so if it is "&f1&7Days" it will convert into "&f1&7Day" and same with the other ones
uh
no idea rip
it just disappears 
go back to the drawing board and use contains
since it works apparently
really? cool, should I change it with the .replace?
K, I will scroll back
var placeholder = "%luckperms_check_permission_access.spawn%";
function returnEmpty()
{
var changed = "";
if (placeholder == "aSí" && placeholder2 == "")
return "&aIt is permanent";
if (placeholder2 == "")
return "&cYou don't have";
if(placeholder2.contains("s"))
changed= placeholder2.replace("s", "&7Seconds");
if(placeholder2.contains("m"))
changed= placeholder2.replace("m", "&7Minutes&f");
if(placeholder2.contains("h"))
changed= placeholder2.replace("h", "&7Hours&f");
if(placeholder2.contains("d"))
changed= placeholder2.replace("d", "&7Days&f");
return changed;
}
returnEmpty();```
Now it only work for Hours :(.
But it does accept it!!:D
Nop, actually it only detects the first one
if it has days, then only Days
no worries, thanks!
I will wait for Blitz xD
You have been helping me for a long of time, I highly appreciate that cj
So in case someone wants to try to help this is the actual state of it:
var placeholder2 = "%luckperms_expiry_time_access.spawn%";
var placeholder = "%luckperms_check_permission_access.spawn%";
function returnEmpty()
{
var changed = "";
if (placeholder == "aSí" && placeholder2 == "")
return "&aIt is permanent";
if (placeholder2 == "")
return "&cYou don't have";
if(placeholder2.contains("s"))
changed= placeholder2.replace("s", "&7Seconds");
if(placeholder2.contains("m"))
changed= placeholder2.replace("m", "&7Minutes&f");
if(placeholder2.contains("h"))
changed= placeholder2.replace("h", "&7Hours&f");
if(placeholder2.contains("d"))
changed= placeholder2.replace("d", "&7Days&f");
return changed;
}
returnEmpty();```
Objectives with the Javascript:
1- Return "It is permanent" when the player has access.spawn on true without expiry. - Perfectly done 
2- Return "You don't have" when the player has access.spawn on false without expiry. - Perfectly done 
3- Change the time format of the countdown. So instead of (for example) showing "10d 1h 10m 1s", show it like "&f10&7Days &f1&7Hour &f10&7Minutes &f1&7Second" - Not done yet 
The current issues are that the format will work **but** it will only show it changed on the first number. For example, if days is the last number on the value, then it would show like this (for example): "&f10&7Days 1h 10m 1s", or if hours is the first number, then "&f1&7Hours 10m 1s". It only works for the first number... reason? We don't know.
The other issue is that there isn't done yet a way to detect if there is "1" for one of the values and change it to singular instead of plural (so instead of "1Days", "1Day", respectively).
Thanks in advance to anyone that tries to help. you can Ping me if you want.
You could use FrozenJoin and just not specify a first join action
When will the 1.16 version of PlaceholderAPI be released, there is no way to get ecloud data now
Check pinned messages
thank you
I get [PlaceholderAPI] Failed to set ScriptEngine for javascript placeholder: error on startup, how can I fix this?
it worked before
I can't seem to get mVdw placeholders to work with the %mvdw<placeholder>%, can someone help
what placeholder are u trying to use? do u have the mvdw expansion installed? do u have mvdwplaceholderapi with an mvdw plugin installed?
/papi reload```
oh
yeah i have that
i didnt know you meant the ecloud
and yes, I have the mvwd plugin installed
The mvdw are loading in
but I cant use them idk why
what placeholder are u trying to use?
tokens_tokens isnt a placeholder according to the spigot page
Their all custom.
but it shows their loading in
even ones from essentials dont seem to work
what does /papi parse me %mvdw_tokens_tokens% return?
was there any errors when u downloaded mvdw expansion and reloaded papi?
Not at all
so its an issue with the mvdw placeholder then
@final shadow can you help?
@glass narwhal,
Please respect the rules, be patient and don't ping staff members!
Wait, how does %bungee_total% work?
Am I supposed to have papi installed on proxy somehow?
I believe it accesses all the servers through redis and gets info that way
I meant, what do I need to do to make it work?
Where do I download the ecloud expansion?
I guess that's not possible then.
hello. just came here to say I have a problem with using PAPI in my own plugin. If PAPI is not installed (I made this softdepend (softdepend: [PlaceholderAPI]), plugin fails to load saying next thing
[23:36:31] [Server thread/ERROR]: Could not load 'mypluginnamewhocares' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: me/clip/placeholderapi/expansion/PlaceholderExpansion
Caused by: java.lang.NoClassDefFoundError: me/clip/placeholderapi/expansion/PlaceholderExpansion
Caused by: java.lang.ClassNotFoundException: me.clip.placeholderapi.expansion.PlaceholderExpansion
Code I use to check if it is installed
if (getConfigurator().config.getBoolean("features.placeholders") && Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
new PlaceholderAPIHook().register();
}```
i'm not sure I use correct channel
I mean yea, the import won't be found if papi is missing
lol
no wait. I still can't understand why it can't load without PAPI.
try {
if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null && getConfigurator().config.getBoolean("features.placeholders")) {
new PlaceholderAPIHook().register();
}
} catch (Throwable ignored) {
}
if someone have time and probably want to help me (why) I can PM my repo
is there a specific needed java version for javascript placeholders to work?
what java are you on
should work
I had 1 js placeholder that used to work, until i tried adding a 2nd placeholder and it broke both
keep getting [PlaceholderAPI] Failed to set ScriptEngine for javascript placeholder:
send your config
Please use a paste service to share configs, errors, code and long logs.
• HelpChat Paste
Do you need main config or the javascript_placeholders.yml?
https://paste.helpch.at/gonekehihi.bash > config.yml
https://paste.helpch.at/usanivukem.shell > log
send the js cfg
the config
javascript_placeholders
also
what in the world is that
that's not a script
https://paste.helpch.at/jowicigayo.js > js cfg
https://paste.helpch.at/ubosulokuj.shell > java_placeholders.yml
No matter how I do it, it just doesn't work
@gleaming python what does /papi parse me %player_has_permission_essentials.fly% return?
'yes'
I just keep getting [PlaceholderAPI] Failed to set ScriptEngine for javascript placeholder: error
# file: party_name.js
# type: string```
is this meant to be commented out?
ye
[16:46:02 WARN]: [PlaceholderAPI] Failed to set ScriptEngine for javascript placeholder: party_name because thats where the error is coming from
its commented out already
and still the same error
just for the haspermission placeholder
[PlaceholderAPI] Failed to set ScriptEngine for javascript placeholder: haspermission
add
file: has_permission.js
engine: 'nashorn'``` to the javascript_placeholders.yml
same error
Can someone explain this error?
what's your server version?
1.15.2
hey what's the reason if i'm getting Failed to set ScriptEngine for javascript placeholder:?
using the latest version (from pins)
try adding engine: 'nashorn' in javascript_placeholders.yml under your file: FILENAME.js
That's the same problem I have ^
Try reloading papi /papi reload or restarting the server
Already did, more than once
Hi when i try to parse a javascript placeholder i get just the plain text i have already install the javascript extension but still don't get it to work
Yup
ty
Hi, when I want to link Bungeecord total players to DiscordSRV, the placeholder doesn't work.
I referenced this, but it still doesn't work.
%bungeecord_total% is the placeholder I used.
I have Bungee installed, and my config looks the same as the one on that page
that is so many versions behind the current one it looks like
i'd suggest updating to the current version
On all servers
It does
/papi parse <placholder> i believe
but just type /papi help
or /papi parse
or something
im sure theres a help message
I have to do /papi parse ayseany %bungeecord_total%
yea probably
And it returns https://seany.club/i/fPFc
that means its not working at all on your server
hmm
does it work with papi parse
On the server it returns a number yea
Weird
It says
# Sets the "Playing: ______" indicator for the bot.
# Can be a single, static value, or cycle through multiple different options
# You can preface the status with "playing", "watching", or "listening to" to set the activity type
# PlaceholderAPI placeholders are supported
So I was guessing its a PAPI issue
is disc srv running on your bungeecord or spigot servers
Spigot
and its parsing properly via papi's parse command
so it should be working
if they do in fact support placeholders
i'd submit an issue with them
@zenith scroll https://github.com/DiscordSRV/DiscordSRV/issues/792
someone already did it lol
they fixed it in a dev build if you want to try that
well you could try the dev build or jusit wait until its official lol
but thats probably the solution
nice
Yo so, I just updated to 1.16, seems like some older plugins aren't working now, does papi not support the old expansions now?
"some older plugins aren't working"
nope, expansions, they seem to not load though
I also have not been able to see the ecloud list, it shows the amount of pages, but no expansions
Are you using the pinned version?
oh, alright, i'll give that a try
ah, perfect, there was an issue with the LuckPerms expansion, seems like everything is fixed. Thank you!
@obsidian niche,
Please respect the rules, be patient and don't ping staff members!
manual works when you type
On the e-cloud website, how do I update the placeholder list for one of my expansions?
Go to Your Expansions then Edit Expansion
Okay thanks!
uuid working but {player} not working pls help me
No one here understand what you even said..
papi mysql query uuid working
okey
but {player} not working
select money from users WHERE username = '{player}' this query not working
Uh what? Is that an expansion or what?
yeah there's a MySQL expansion
It's %player_name%, and ask the author of the expansion I guess
{player_name} instead of {player}
not wroking
And make sure you have the player expansion installed
Ask the expansion author 🤷♂️
Wot
You mean "how to contact the author"?
I don't seem to find any possible contacts from the author though
I mean, i found the author name, but where to contact that dude ;p
Also "quary" :)
Yea was just checking, idk ask cube to see if he has his discord
Hi, any info when update papi to 1.16?
good, thanks
what ?
i get this error with the statistics expansion
12.07 17:04:46 [Server] ERROR [PlaceholderAPI] Failed to init placeholder expansion from class: com.extendedclip.papi.expansion.mcstatistics.StatisticsExpansion
12.07 17:04:46 [Server] ERROR [PlaceholderAPI] org.bukkit.Material.isItem()Z
how to fix tags spaced? is there a way
uh where my javaskript folder ??
ive reinstalled mutiple times and no javaskripts.. ill try maybe making a folder
Does somebody knows how to display in the lobby how many players on a other server?
for placeholders?
Thank u
https://gyazo.com/e3c2858a2459beb81ec941d10550e618 how fix this with palceholderapi? there was way before
huh
or players
yeah but that problem is that this only display the amount of players that are on that server
Not on a other server
The Placeholder is in the lobby.
world
i use bungeecorde
ahh
for another server
okay
is this even possible?
oh
im sorry
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/ to upload images/screenshots.
you pasted the link twice
My deluxe tags are kinda bugging out
use the dev build pinned
https://www.spigotmc.org/resources/medieval-factions.79941/ is there any placeholders for this? or what
@carmine veldt
when will be papi for 1.16 version on spigot
i'm not tried 1.15 version on 1.16 i hope works
Does somebody knows how to display in the lobby how many players on a other server?
@hearty tapir Somebody got an idea?
@grim frost check pinned messages
okey thanks
what does /papi parse me %jobsr_user_jlevel_Oduncu% ?
Does EzPrestige have a PAPI placeholder for the cost of the next prestige? There was an MVDW placeholder for this, but the PAPI wiki only displays placeholders for current and next prestiges.
Yeah... I got that.
I used one for FeatherBoard, but I'm changing to KiteBoard.
No, it displays the ID of the next prestige.
{ezprestige_nextprestige_cost} is what I used.
yeah I get it but doesn't look like there is any
Can anyone help me with my issue please?
what's your issue exactly?
Dang, that sucks. Would one exist for MVDW and not PAPI for any specific reason?
Ever since i updated to 1.16.1 some placeholders are not working
https://imgur.com/a/CheUf2j
In 1.15.2 it worked fine look.
https://imgur.com/a/ikLtaCg
Any ideas?
not sure actually
and it doesn't work if you do /papi parse me %placeholder% either?
Nope nothing
and all you changed is the server version?
Yes from 1.15 to 1.16
have you tried using the dev build of PAPI for 1.16?
and are you on latest LP version and also latest LP expansion?
I'm on the latest Lp version. What expansion are you talking about
/papi reload```
oh yes, i have done that several times
and other luckperms placeholders work?
These are the only ones i have
as in /papi parse me %luckperms_prefix% works?
I get nothing back from that
this is very weird because for me it works
and am on almost latest build of 1.16
and not even using the dev build of PAPI
hmm interesting
well I would if you ask your question
papi mysql?
Who help me
Select coins from coins_table where username = 'EmralRG'
Manuelly working
But
Select coins from coins_table where username = '{player}'
Not working
try with {player_name}
Not working
then it isn't supported
Hey, so I'm trying to do a Math expression with a placeholder that uses {} to surround UUID and it is conflicting with the {} which is required as a replacement to %%. How can I get around this? and also this is getting used in DM.
javascript is your only option
Could I get an example, I know nothing of Javascript.
I'm trying to use it on and item in DeluxeMenus with the Math expansion.
give me the math placeholder you want to use
%math_{skript_Coal::{uuid}} * 1.5%
and what is the amount you want?
I'm calculating the worth of each resource in a backpack by multiplying how much they have by how much it sells for.
%skript_Coal::{uuid}% returns how much they have.
requirements:
coal:
type: javascript
expression '"%skript_Coal::{uuid}%"*1.5 > 100'
I'm trying to use it in a lore, not a requirement.
Greetings, I would like to use placeholder api world guard. Is it possible to replace an empty message with some text if there is no presence in the region?
oh I see
Here is this placeholder: %worldguard_region_name%
Sadly, I do not know how to do this ...
1 sec I'll give you both a link
That would be great
I knew about this, but I don’t know how to write scripts ... But anyway, thank you so much!!
oh
I mean its not that hard
function changeReturn(){
if ("%worldguard_region_name%" != "")
return "%worldguard_region_name%";
return "Your Message Here";
}
changeReturn();``` @jagged spear
K this is where my issue with Javascript rises, idk if .js will work but if .json is essentially the same thing and I can change the extension, then I can use Java Scripts.
Can't post screenshots
@karmic marsh,
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/ to upload images/screenshots.
its not the same but why wouldn't you be allowed to use other file extensions?
Minehut 🤮
I've been waiting a while now and the expansion still hasn't downloaded. It might even be blocked.
function changeReturn(){ if ("%worldguard_region_name%" != "") return "%worldguard_region_name%"; return "Your Message Here"; } changeReturn();``` @jagged spear
@turbid tide thanks, will this work?)
I've been waiting a while now and the expansion still hasn't downloaded. It might even be blocked.
I'm sorry for you
wdym Dada?
will what work?
Is there a placeholder for EXP in papi for essentials?
there is one for exp but its not in essentials
Ah.
I need help
There is no time to wait! Ask your question @fickle eagle!
Hi when i try to parse a javascript placeholder i get just the plain text i have already install the javascript extension but still don't get it to work
can you do /papi parse me %placeholder% send a screenshot with the command you used and what it returned and then paste the javascript file?
?paste
?imgur
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/ to upload images/screenshots.
placeholder
Just says that
%placeholder%
In white text
seems like i cant paste the js file @turbid tide
=paste
Please use a paste service to share configs, errors, code and long logs.
• HelpChat Paste
@fickle eagle paste the content of your file on that site, save and send the url
just send one of them
yes
what's your PlaceholderAPI version?
2.10.6
server version?
1.15.2
when you do /papi reload
do you get anything in the console about javascript placeholders?
12.07 22:43:41 [Server] INFO PlaceholderAPI configuration reloaded!
12.07 22:43:41 [Server] INFO Successfully registered expansion: player
12.07 22:43:41 [Server] INFO Successfully registered expansion: statistic
12.07 22:43:41 [Server] WARN Failed to set ScriptEngine for javascript placeholder: dameCristal
12.07 22:43:41 [Server] WARN Failed to set ScriptEngine for javascript placeholder: dameStatus
12.07 22:43:41 [Server] WARN Failed to set ScriptEngine for javascript placeholder: dameTitulo
12.07 22:43:41 [Server] WARN Failed to set ScriptEngine for javascript placeholder: asd
12.07 22:43:41 [Server] INFO Successfully registered expansion: javascript
12.07 22:43:41 [Server] INFO Successfully registered expansion: server
12.07 22:43:41 [Server] INFO 16 placeholder hooks successfully registered!
failed to set scriptengine
for all my files
ok
(paste it on the site)
12.07 22:47:40 [Server] INFO This server is running Paper version git-Paper-143 (MC: 1.15.2) (Implementing API version 1.15.2-R0.1-SNAPSHOT)
12.07 22:47:40 [Server] INFO You are 235 version(s) behind
Updating will be a night and day change oml.
ok lol
think my hosting service was behind
lol
on those updates
now im updating to 371
okay
im on 371
does it work now?
what if you redownload the Javascript expansion?
12.07 22:53:44 [Server] INFO Psychological issued server command: /papi reload
12.07 22:53:44 [Server] INFO Successfully registered expansion: player
12.07 22:53:44 [Server] INFO Successfully registered expansion: statistic
12.07 22:53:44 [Server] WARN Failed to set ScriptEngine for javascript placeholder: dameCristal
12.07 22:53:44 [Server] WARN Failed to set ScriptEngine for javascript placeholder: dameStatus
12.07 22:53:44 [Server] WARN Failed to set ScriptEngine for javascript placeholder: dameTitulo
12.07 22:53:44 [Server] WARN Failed to set ScriptEngine for javascript placeholder: asd
12.07 22:53:44 [Server] INFO Successfully registered expansion: javascript
12.07 22:53:44 [Server] INFO Successfully registered expansion: server
/papi ecloud download Javascript
/papi reload
nopenope
=/
nashorn yes
think it could be that
cause
ik its a jsavascript engine
but idk if its working with placeholder
yeah
idk what to do lol
generally, others just come here and hemp people if they know why it doesn't work
so either some are just lazy like me sometimes x), either they aren't available, or else they just don't know
👀
what if
what if you try to setup a smalk test server with only PlaceholderAPI and the Javascript expansion
and try to make one script load
i could try
but i dont see how this will effect placeholder api
if i just copy a scripy
wont i do the same
?
I have no idea x)
=/
placeholder api placeholders arent working in skript for me
both skript and papi are up to date
set slot 13 of player's current inventory to slime ball named "&6Server: &c%server unique joins%"
how do i put placeholder api placeholders into a skript for it to work because its not working no matter what way i try it
ok
also does my server need to be spigot
mine is paper and that might be the issue
I don't think so
ok
I don't see why it would affect
Is there a placeholder that can put the item in hand into a GUI slot?
what's the best way to create a placeholder that displays different text depending on which permission group the player is in? Was thinking a javascript placeholder but I'm not sure if it's possible to grab the vault group.
where can i find the most recent dev build of the plugin?
in the pinned messages here
ty
no problem
Is anyone else having a problem connecting to the PAPI ecloud? For some reason atleast my server isn't and its preventing me from downloading the deluxe chat apis
13.07 05:05:59 [Server] Server thread/INFO [PlaceholderAPI] Successfully registered expansion: player
13.07 05:05:59 [Server] Server thread/WARN [PlaceholderAPI] Loaded class me.clip.deluxechat.DeluxeChat from DeluxeChat v1.16.0 which is not a depend, softdepend or loadbefore of this plugin.
13.07 05:05:59 [Server] Server thread/INFO [PlaceholderAPI] Successfully registered expansion: deluxechat
13.07 05:05:59 [Server] Startup Done (5.815s)! For help, type "help"
13.07 05:05:59 [Server] Craft Scheduler Thread - 0/INFO [UltraPermissions] Loading Translations from the Web...
13.07 05:05:59 [Server] Craft Scheduler Thread - 3/WARN [PlaceholderAPI] Unable to fetch expansions!
13.07 05:05:59 [Server] INFO There was an error with the server host connecting to the PlaceholderAPI eCloud (https://api.extendedclip.com/v2/)
13.07 05:05:59 [Server] Craft Scheduler Thread - 3/INFO [PlaceholderAPI] 0 placeholder expansions are available on the cloud.
Github is apparently down. that might be the issue.
copy. ill keep trying occasionally. i wonder if anyone else is having the issue though. trying to isolate if it is just me having the issue
It's random
u can download the expansions manually with the link in the error
Hello everyone, please help me, why am i being gived out "[object Array]" ?
function check() {
if (faction === "0") {
return "&7No keys :(";
}
if (faction === "1") {
return "&uYou have 1 key!";
}
else {
return faction;
}
}
check();```
As you're declaring faction as an array
so it will be returned as an array
Just remove the square brackets and you should be fine
Thank you very much @balmy marten ! And is it possible to do that me wrote in response 1 + 1 = 2, not 1 + 1 = 11. I'm just newbie to this and I don't know how to do it
try to remove the " " around the placeholders
how do I use luckperms with deluxe chats?
#spigot-linking
how do i do that?
follow the instructions on the channel
#spigot-linking in case you didn't find it
i get this error with the statistics expansion
12.07 17:04:46 [Server] ERROR [PlaceholderAPI] Failed to init placeholder expansion from class: com.extendedclip.papi.expansion.mcstatistics.StatisticsExpansion
12.07 17:04:46 [Server] ERROR [PlaceholderAPI] org.bukkit.Material.isItem()Z
Use the pinned version of the statistics expansion
thanks
Hi, I'm getting warn in the console [PlaceholderAPI] Failed to set ScriptEngine for javascript placeholder: wg_isowner. What does it mean?
javascript_placeholders:
wg_isowner:
file: example.js
engine: nashorn
example.js:
function dt_owner() {
return "%worldguard_region_owner%".contains("%player_name%");
}
dt_owner();
and that placeholder doesn't work (%javascript_wg_isowner%)
Maybe someone know how to fix this?
whats the placeholder to show world time?

%player_world_time%
%player_world_time_12%
%player_world_time_24%
the one kaliber gave you shows you a specific worlds time. this ones show the time of the world the player is in
display information about the player or the server or even other things in plugins which supports it
for example, displaying the rank of the player or the online player count in the scoreboard
Ok thanks
hey everyone, there is a new PAPI dev build I would like you all to try if you get a chance.. The dev build revamps the command system and after this is tested and ironed out we can move on to other things regarding the update of PAPI.
👀
Would anyone happen to know of a placeholder that shows the Total experience earned on a server?
%player_total_exp% would give you all your current xp, but you said on TAB's discord that you have a system that stocks them somewhere or something like that?
haha yea i was just there trying to figure this out. I'm currently using %player_total_exp% and whats happening is that when the player dies, that number reverts back to 0. When a player dies in game tho, it shows their score at the top of the death screen with the value I am trying to get in the tab list.
which is the total amount of exp that they have earned disregarding deaths
couldn't find a placeholder for that =/
I'll try to check something
I may have something
/papi ecloud download Javascript
/papi reload
go into your PlaceholderAPI folder in your plugins folder
open javascript_placeholders.yml
add this at the bottom:
totalexp:
file: totalexp.js
go in the javascripts folder and create a file called totalexp.js and add
function getTotalExp() {
return BukkitPlayer.getTotalExperience()
}
getTotalExp();
And then /papi reload
then you can use %javascript_totalexp%
@Sebio.#0001
try that
if it still clears on death, then I don't know if it's possible
I'll still have another idea in mind in case
@slate oar
why is that Discord on phone not mentionning when I want but does when I don't want ;-;
hi sorry i was eating some dinner. I'll try this out rn
okay
okay So i have that all in and gave it a try. So right now, its not reading what my current total exp would be but it's counting my experience, but its still reverting back to 0 after death
I was looking into doing that but I have no idea on how to actually set that up.
ok so the objective xp acts in the same way as before
when you die, the xp is classified as score
but searching up placeholders for score basically directs be to the papi scoreboard expansion
but its all good @junior musk I appreciate your help 🙂
Whats the opposite of .contains?
Anyone knows?
I mean, how would it be for "doesnt contain"
I think it is with exclamation but not sure where it should go
👍
What a shorty thumb
👎
😂
🙃 👎
Anyone experiencing issues with javascript placeholders?
particularly: [Server thread/WARN]: [PlaceholderAPI] Failed to set ScriptEngine for javascript placeholder:
=paste
Please use a paste service to share configs, errors, code and long logs.
• HelpChat Paste
send the entire log
Startup Log Location
Your latest startup log can be found in the logs folder of your
server directory, labeled as latest.log.
Please copy the contents and paste them to a paste service.
Type ?paste for more information.
can you also send over the javascript_placeholders.yml
why don't you send entire files
that's the entire javascript_placeholders.yml file
that would make sense
why are you trying to configure it like deluxemenus
O.o
hmm
Its been like that for ages lol
An expansion that allows you to use javascript for processing
• Wiki
• Community Scripts
• GitHub
• eCloud
check the wiki
you know
that's nowhere near correct
that's not right
technically it probably would still work, but expression and type are not needed
ok shortened
can you still send over the entire startup log?
it could be due to server stuff
sorry, thought it was unspoken about latest version
latest version is 2.10.6
if you are using an experimental build, that should be stated
yea, we were on 2.10.6 issue arose after 1.16 update
tried latest dev build, same result
can't read minds tho
Do you have ChatControlPro?
indeed
What's the issue there glare?
Use the jar linked in that comment.
ah perfect
I had to make a custom version to work with CCP.
now I can keep this in mind
woop woop, that worked. Thanks a lot
not sure how niche javascript users are on PAPI
but pinning that would help others I'm sure
thanks again
that meme popped in my head before you posted it lol
oh god inception
brain power
how do I put multiple .replaces for one if? I tried ; and going a line under but they won't listen the if, only the first one will listen it
Or will I have to put an if for each one?
it would be much space wasted if that, but anyways, is it possible?
are you asking for java? javascript?
Javascript
=paste
Please use a paste service to share configs, errors, code and long logs.
• HelpChat Paste
send what you have
is it really needed? Im on phone rn xD
Uh sorry, I will open discord on pc, it takes a while 😂
still opening :l
https://paste.helpch.at/ugakapekis.bash
So basically is this. Only changed= changed.replace(" 59m",""); will be listened by the if, but the other ones will work alones without any if requirement to run
if statements without brackets run the next line if true
Thanks cj89898! It works, sorry for not helping you to help me before, my pc is a potato :l.
:D, I thought that it would be with another way such as , instead of ; I wasn't expecting the brackets one xD
cj, I'm trying to make work the cooldown javascript from the other day, and from now it is going pretty well, I will update if I get it finished without any issues hehe
(using the messiest way)
Hello! So I had someone config a plugin for me that uses both 'DeluxeMenus' & 'ChunkClaim'. The result was I can do /claim which opens up a GUI to which I can choose between Claim or Unclaim. However, when you buy a chunk, your next purchase will be 25% higher. This did in fact work when I was in 1.15.2, but since updated to 1.16.1, the placeholders for the Meta don't seem to work. Thank you for your time!
ChunkClaim Config: https://pastebin.com/6mqpeDbT
DeluxeMenues (claim) Config: https://pastebin.com/L2nBJgVm
Imgur of the result: https://imgur.com/a/PbtFM4C
||actually, it's the placeholders for the meta which don't work anymore||
Ah yeah sry ^
?help
» Give the helpers some details
» Ask suitable questions
» Be polite
» Wait
where you guys will update placeholders for 1.16 ? Ty 🙂
Thank you Waffle 🙂
Is there a server online status placeholder? for bungee
Yo
Is there a placeholder that is the amount of slots available in ur inventory?
That'd be fairly useful
Is there a way to check other players stats? For example, if I put Into my configuration %statistics_mine_block% it shows my amount but i want to see specific players stats. Is that possible?
Well, i wasn't asking you 😂.
Ik, i thought it was EZBlocks u were talking about
and ik a bit about it cuz I use it on my server lmao
I thought I could've helped but nah
you should be able to use checkitem with air @polar umbra
@robust ibex if you type /papi parse <player> <placeholder>
if you need a placeholder for it you can use the parseother expansion
https://helpch.at/placeholders#checkitem @polar umbra
ty dude
official papi 1.16 when 😛
theres a pinned dev build in this channel, although nothing official yet
I'm wondering something with the Javascript expansion, is it possible to hook in other plugins ? 👀 Because I want to check if an offline player has a permission, but hasPermission only works on online players and apparently it is possible with Vault but idk if there's a way to do it without creating an expansion in Java ;-;
learn java 
javascript expansion is only really meant for small, little placeholders imo. if ur hooking into other plugins, even if possible with JS, ur best bet is still java
☹️
np ill make it in kotlin instead 
Hello, I need some help for a problem with the PAPI Spigot Plugin
Elaborate
When I Install the PAPI Plugin in my server it doesn't create any type of Folder for the plugin itself, what can I do?
Upload your latest.log to pastebin @slim talon
Also delete that link, It contains your IP along with someone else's
Good to know.
Sorry for disturbing
It's alright, it's what we're here for
Thx anyway 😄
@junior musk You'd have to cache the offline players perms yourself, meaning that's not really efficient (since you can't retrieve perms from an offline player iirc)
yeah ;-;
but apparently
it's possible to get the permissions from an offline player with Vault
so I opened an issue on the repo of the Vault Expansion to add a had_permission placeholder which supports offline players :D
and meanwhile, I've opened an issue on the js expansion repo to update my script in the Community Scripts wiki 🙂
Hi so i was just wondering... i was using Papi ecloud and i was trying to get McMMO. It downloads it, it doesn't show up in my list but the expansion is in my expansion folder.
||Hello back!
I'm currently writing an if condition that must include a lot of !contains. inside of it to work as intended. And those !contains. contions would consist of a number that jumps from 10 to 10, and I was wondering if there was any way to make a calculation so you don't have to write so many conditions.
So the situation would be something like this:
if(changed.contains("1d") && !changed.contains("11d") && !changed.contains("21d") && !changed.contains("31d") && !changed.contains("41d") && !changed.contains("51d") ... and it will keep going)
changed= changed.replace("d","Day");```
So is there any way to make a calculation or something to replace all those `!contains.` conditions with only 1?||
I mean just check if there's a d lol?
true lol
There's so many better ways of having plural words than doing what you're doing
||Nope, because on that part that I sent, I'm checking for d only on the case that the days on the countdown is 1, and the problem which caused me to use multiple !.contains is that in front of the placeholder there isn't any space or something to just replace " 1d" with " 1Day", that's why I'm using this method, anyways, how could I perform that regex way Tanguygab?||
||Also I would not be able to just put placeholder == "1d" because it would ignore the other time parameters in case the countdown placeholder contains them||
||I will investigate about regex, and see if I can get to do something with it||
Nevermind, I could fix it myself xD 👌
what if you add a space before the placeholder string, then check for " 1d", so it doesn't count 41d etc... and then you remove the first character of the string which is the space
ah
oki👍
what if you add a space before the placeholder string, then check for " 1d", so it doesn't count 41d etc... and then you remove the first character of the string which is the space
That would work on this situation, but not on the entire thing I'm working on, since you would be ignoring the other time parameters (hours, minutes and seconds) and it would break, tho I'm trying my best to finish it how I want. Thanks for helping anywars Gab!
anyways* not wars please
I mean, it wouldn't actually break, but that condition would only work for 1 specific second (only when the placeholder returns " 1d" it will replace with the thing we want, but before it was " 1d", it was "1d 2h 28m 10s" for example, and on that case it wouldn't be detected by the condition since it only checks that the value of the placeholder is " 1d" ignoring everything after it)
The thing is, There is now way to make a space in front
" " + "%placeholder%"
x)
Thanks a lot gab
When papi official 1.16 version?
no official version yet, however there is a pinned version that supports 1.16
Ok thank you
o wheres the new ones?
PlaceholderAPI 1.16 Dev Builds
https://ci.extendedclip.com/job/PlaceholderAPI/
👍
How can I change the description of one of my placeholderapi expensions on api.extendedclip.com ?
Hover over Expansions and click Your Expansions @coarse sable
Foud it, thanks!
How does that rating system work?
I finally could make the expiry placeholder! not only with the single feature of telling the whole time parameter (Days instead of d, for example), I've even added some other cool features:
- When there is 1 as value on a time parameter, then the time parameter's name will change to singular instead of plural (example: 1Days --> 1Day)
- Parameters are now colored in a degraded light blue to dark gray pattern to indicate which time parameter is longer and which one shorter (Days: light blue;Hours: Turquoise;Minutes: Gray;Seconds: Dark gray)
- Now to avoid being a really long placeholder, it will only show the first 2 time parameters, so for example, if the expiry is 2days-20Hours-40Minutes-16Seconds, then it will only show Days and Hours, but if there arent days, then it will show Hours and Minutes and respectively. But if the expiry is for example 10Days-30Minutes, then it will only show 10Days since the first parameter is Days and after that it comes Minutes but there arent minutes.
- Now there is a comma (colored as dark gray) as a separator, and will only appear if there is another time parameter next to it, so if the expiry is for example 10Days-20Hours, then it will show as "10Days, 20 Hours" and if there aren't hours, then it will show like "10Days" without the comma.
Has been fully tested and works 10/10
I am really glad and happy that I could make it by myself, so I won't bother here again about that topic xD
Thanks a lot, Blitz, Cj and Gab!
Somebody tell me why it doesn't work 😦
var r200 = "%player_has_permission_askyblock.island.range.200%"
var r300 = "%player_has_permission_askyblock.island.range.300%"
function islandRange(){
if(r300 == "true") { return "&7300 x 300"; }
else if (r200 == "true") { return "&7200 x 200"; }
else if (r100 == "true") { return "&7100 x 100"; }
else { return "&750 x 50"; }
}
islandRange();
ok i found my error ... i need to add ; at the end of var --"
but don't work ... return every time : 50x50 >_<
ok i found ... replace true by yes --"
I'm having a problem with my scoreboard.. I'm not sure if it's the scoreboard or the placeholderapi
So everytime i put {placeholderapi_placeholder} it shows nothing and spams this error
[09:46:23 WARN]: org.apache.commons.lang.UnhandledException: Plugin FeatherBoard v4.25.0 generated an exception while executing task 2621
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.AbstractMethodError
at be.maximvdw.featherboard.ci.a(ci.java:287)
at be.maximvdw.featherboard.P.a(P.java:30)
at be.maximvdw.featherboard.cS.a(cS.java:51)
at be.maximvdw.featherboard.cS.a(cS.java:14)
at be.maximvdw.featherboard.api.scoreboard.ScoreboardLine.updatePlaceholders(ScoreboardLine.java:52)
at be.maximvdw.featherboard.api.scoreboard.ScoreboardGroup$AnimationUpdater.run(ScoreboardGroup.java:1)
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:59)
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
... 3 more```
make sure ur on latest mvdwplaceholderapi
When I try to make this javascript placeholder it does not change the placeholder to a different value
it is %javascript_greaterThan,10,20%
var placeholder;
if (args.length == 2) {
placeholder = args[0];
}else{
return false;
}
if (placeholder > args[1]){
return true;
}else{
return false;
}
this is in the javascript_placeholders.yml file:
greaterThan:
file: greaterThan.js
it doesn't show an error in the console, and I assume no matter what it would either output true, false or an error
change it from return true/false to return "true"/"false" for it to return text
I tried that and I also tried changing the entire javascript to just return "true"; 1 line to troubleshoot but it doesn't seem to register that it is a placeholder in the first place
it works when I remove the arguments ,10,20
oh
try not to declare var placeholder; before
just do directly var placeholder = args[0]
and see if that could fix it
the first argument must be separated with a _ from the script identifier
oh tang is right
%javascript_greaterThan_10,20%
didn't even notice that
I did when he said it was working without args x)
ohh yeah thanks that is working, is it possible to put a placeholder in an argument?
yeah
like {vault_eco_balance}?
use {} instead of %%
{}
yep
cool
You might need to parse it beforehand yourself