#placeholder-api
1 messages · Page 103 of 1
can you make a javascript placeholder have 2 placeholders in 1 document?
so 2 javascripts in 1 file?
yea basically
I don't think so
kk guess ill just make 2 files lol
I mean what you could do is make it with argujments
and then do 2 cases
if the argument is 1 or 2
and just put your code for each placeholder in those 2 if blocks
how do you check for arguments with a placeholder?
What he means is if you have a place holder being equal to 2 words how do you select with one of the arguments you want
so you call the placeholder like this: %javascript_NAME_ARGUMENT% and then in the config you get the argument by doing var argument = args[0] or just use args[0] directly so for example if (args[0] == 1)
i was trying to do it alike this and then recall it with %javascript_server_test1
but it didn't work it doesn't even reconise that it's a place holder do you know what i've done wrong ?
if (args[0] == test1) {
function name() {
return servername = 'test1';
}
} else if (args[0] == test2) {
function name() {
return servername = 'test2';
}
} else if (args[0] == test2) {
function name() {
return servername = 'test3';
}
}
name();
if (args[0] == "test1") {
function name() {
return servername = 'test1';
}
} else if (args[0] == "test2") {
function name() {
return servername = 'test2';
}
} else if (args[0] == "test2") {
function name() {
return servername = 'test3';
}
}
name();
it still doesn't seem to be working :/
it's litterly just creating a placeholder for our server name
the thing i send earlyer is the entire script there is nothing else to it
well return servername = 'test3' is wrong
you need to use return "servername = test3"
the function worked ?
we have this currently setup in multiple scripts with only 1 name per thing
that is wrong as well
Can anyone tell me the placeholder for 'prefix'
%vault_prefix%
its not working
make sure you have downloaded the expansion /papi ecloud download Vault /papi reload
Okay thank you
function name() {
if (args[0] == "test1") {
function name() {
return "servername = test1";
}
} else if (args[0] == "test2") {
function name() {
return "servername = test2";
}
} else if (args[0] == "test2") {
function name() {
return "servername = test3";
}
}
name();``` @trail yacht
lemme try
there is a } missing and if i add it it says that name is never recalled
btw
"test1" is the place holder
so, this script works as we want it to but i would like to be able to have multiple outputs with it and thats what i am trying to do and got stuck on as you've noticed
function name() {
return serverip = 'ViciousMC.serv.nu';
}
name();
oh wair
I just saw
function name() {
if (args[0] == "test1") {
return "servername = test1";
} else if (args[0] == "test2") {
return "servername = test2";
} else if (args[0] == "test2") {
return "servername = test3";
}
}
name();
here you go
My pc crashed xD
so you had to wait a minute
@trail yacht
Can someone help with this please
So I have a bungeecord network and was trying to install papi onto it but I keep getting this error
org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:169) ~[patched_1.15.2.jar:git-Paper-245]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:148) ~[patched_1.15.2.jar:git-Paper-245]
at org.bukkit.craftbukkit.v1_15_R1.CraftServer.loadPlugins(CraftServer.java:359) ~[patched_1.15.2.jar:git-Paper-245]
at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:234) ~[patched_1.15.2.jar:git-Paper-245]
at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:895) ~[patched_1.15.2.jar:git-Paper-245]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method) ~[?:1.8.0_242]
at java.util.zip.ZipFile.<init>(ZipFile.java:225) ~[?:1.8.0_242]
at java.util.zip.ZipFile.<init>(ZipFile.java:155) ~[?:1.8.0_242]
at java.util.jar.JarFile.<init>(JarFile.java:166) ~[?:1.8.0_242]
at java.util.jar.JarFile.<init>(JarFile.java:130) ~[?:1.8.0_242]
at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:157) ~[patched_1.15.2.jar:git-Paper-245]
... 5 more```
papi doesn't work on bungee
if that is what you were trying to do
you have to install it on every server
but not on bungee
@turbid tide sadly it still doesn't seem to work am i recalling it correctly by using %javascript_server_test1% the file is called server
@trail yacht,
Please respect the rules, be patient and don't ping staff members!
yeah
well then it still doesn't work :/
it just puts the placeholder in chat with out even saying it's a script error
any errors in console?
do you have any clue what can be the issue?
Please use a paste service to share configs, errors, code and long logs.
• HelpChat Paste
@trail yacht you know %server_name% exists right?
FYI, the Javascript expansion has some issues with concurrency. You can fix it easily by making sure you use a ReentrantLock before inputting variables into the engine/ evaluating it.
I can make a PR when I have some free time.
@trail yacht you know
%server_name%exists right?
@turbid tide yes but we are also saving our website link / buycraft link like this
send these files
@mint fable my friend just came up with something wich might be the issue if this still doesn't work then ill send them
it works now thanks for the help
what was it?
he forgot to put it in javascript config xD
nice
like he was like "its still not working wtf" and i was like "did you even put it in the config" "uhhh"
ggwp
how can i add an api to an item in the lore? example iron sword with lore "Welcome: [nickname]
so how to use placeholders in plugin names or lores?
you probably need a plugin that can do that
unfortunately no
I tried the essentials when giving a kit but I did not get results
what is your server version? I found this to 1.8-1.12
actually 1.7-1.12
also found this
for 1.15
and this
for 1.8-1.15
@buoyant nexus ^
idk if any support placeholders tho
tysm i try it
Is there a KDA placeholder?
Math
I don't really understand what you mean tbh
var DecimalFormat = Java.type("java.text.DecimalFormat");
var format = new DecimalFormat("#,###.00");
var balance = %vault_eco_balance%;
function formatBalance() {
return format.format(balance)
} if (balance == 0) {
return "0.00";
}
formatBalance();
is that right?
ah i see Thanks!
@compact wharf Try it out and see
nope lmao it gave me script error
Put the placeholder in ""
wdym which placeholder?
Now how can i make it return "ViciousMC;" if there is no args[1] found ?
function name() {
if (args[0] == "name") {
if (args[1] == "tag") {
return "&e&lVicious&6&lMC";
} else if (args[1] == "") {
return "ViciousMC";
} else {
return "!!! INVALID ARGUMENT !!!";
}
} else if (args[0] == "buycraft") {
return "buy.ViciousMC.serv.nu";
} else if (args[0] == "ip") {
return "ViciousMC.serv.nu";
} else if (args[0] == "donator") {
if (args[1] == "tag1") {
return "&f&LIron";
} else {
return "!!! INVALID ARGUMENT !!!";
}
}
}
name();
@compact wharf You balance variable
it was working without it, same thing happens when i put it in ""
i do know to use
if (args && !args.length) {
}
with discord bots if you wanna have no 2nd argument but how does that work in that case above
function getTag()
{
var argument = args.length >= 1 ? args[0].toLowerCase() : null;
var tag = args.length === 2 ? args[1].toLowerCase() : null;
switch (argument)
{
case "name":
if (tag === "tag") return "&e&lVicious&6&lMC";
else if (tag === "") return "ViciousMC";
else return "!!! INVALID ARGUMENT !!!";
case "buycraft":
return "buy.ViciousMC.serv.nu";
case "ip";
return "ViciousMC.serv.nu";
case "donator";
return tag === "donator" ? "&f&lIron" : "!!! INVALID ARGUMENT !!!";
default:
return "!!! INVALID ARGUMENT !!!";
}
}
getTag();
script error :/
what's the error
you mean in console ?
Please use a paste service to share configs, errors, code and long logs.
• HelpChat Paste
try the updated one
still a error
lemme get the error
it's also still giving me that error of getting ; but expecting : in visualstudio code
if i change the error above to be fixed it is able to return the "name,tag" but if you try to recall "name" it returns the "buycraft" value
"name,"
i've tried that already it still returns the "buycraft" value
show me the js you have
this is litterly the entire thing
function getTag()
{
var argument = args.length >= 1 ? args[0].toLowerCase() : null;
var tag = args.length === 2 ? args[1].toLowerCase() : null;
switch (argument)
{
case "name":
if (tag === "tag") return "&e&lVicious&6&lMC";
else if (tag === "") return "ViciousMC";
else "!!! INVALID ARGUMENT !!!";
case "buycraft":
return "buy.ViciousMC.serv.nu";
case "ip":
return "ViciousMC.serv.nu";
case "donator":
return tag === "donator" ? "&f&lIron" : "!!! INVALID ARGUMENT !!!";
default:
return "!!! INVALID ARGUMENT 2 !!!";
}
}
getTag();
using %javascript_server_name,% i now get invalid argument :/
same for %javascript_server_name%
function getTag()
{
var argument = args[0].toLowerCase();
var tag = args[1].toLowerCase();
switch (argument)
{
case "name":
if (tag === "tag") return "&e&lVicious&6&lMC";
return "ViciousMC";
case "buycraft":
return "buy.ViciousMC.serv.nu";
case "ip";
return "ViciousMC.serv.nu";
case "donator";
return tag === "tag1" ? "&f&lIron" : "!!! INVALID ARGUMENT !!!";
default:
return "!!! INVALID ARGUMENT !!!";
}
}
getTag();
when i paste that in visualstudio code it says getTag(); is unreachable code
does it show you where
in visualstudio code a program for coding
You can ignore it
...
you can't because i get a script error now 🤷♂️
show the error
No idea, let me take a look at vsc
I'd check myself but server still down eee
Do a localhost ._.
No i'm talking to frosty
well the error i get are
yea i know
i've changed them
but the thing you said i could ignore still wont work
🤷♂️
Show code again
https://imgur.com/a/CeXrk4q this is with out me changing the ;
var argument = args[0].toLowerCase();
var tag = args[1].toLowerCase();
switch (argument)
{
case "name":
if (tag === "tag") return "&e&lVicious&6&lMC";
return "ViciousMC";
case "buycraft":
return "buy.ViciousMC.serv.nu";
case "ip":
return "ViciousMC.serv.nu";
case "donator":
return tag === "tag1" ? "&f&lIron" : "!!! INVALID ARGUMENT !!!";
default:
return "!!! INVALID ARGUMENT !!!";
}
}
getTag();
this is what i changed it to
I mean yea, you removed the entire function method..
You did have no function on your vsc also...
remove the , now
I've tried that still an internal error :/
function getTag()
{
var argument = args[0].toLowerCase();
var tag = args.length === 2 ? args[1].toLowerCase() : "null";
switch (argument)
{
case "name":
if (tag === "tag")
{
return "&e&lVicious&6&lMC";
}
return "ViciousMC";
case "buycraft":
return "buy.ViciousMC.serv.nu";
case "ip":
return "ViciousMC.serv.nu";
case "donator":
return tag === "tag1" ? "&f&lIron" : "!!! INVALID ARGUMENT !!!";
default:
return "!!! INVALID ARGUMENT !!!";
}
}
getTag();
It works 😊
thanks for helping me altough it took a while sorry for taking your time :/
is there an extension that shows ping of a player ?
%player_ping% in the Player expansion
Yes..
doesnt work
what does it show ?
nothing
" &8» &9Ping : &7%player_ping%",
its to long
it says nananan > 24
if it was working
the caracters
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/ to upload images/screenshots.
hread.run(Thread.java:748) [?:1.8.0_252]
[10:08:41 WARN]: [FFARush] Task #1874 for FFARush v1.0 generated an exception
java.lang.IllegalArgumentException: Line 4 is longer than 30 chars
at fr.rhodless.ffarush.libs.sb.FastBoard.updateLines(FastBoard.java:261) ~[?:?]
at fr.rhodless.ffarush.Main.updateBoard(Main.java:87) ~[?:?]
I saw that :p
i have another problem
" &8» &9Coins : &7%vault_eco_balance%",
[10:08:41 WARN]: [FFARush] Task #1874 for FFARush v1.0 generated an exception
java.lang.IllegalArgumentException: Line 4 is longer than 30 chars```
check if there's a config option
what ?
maybe it's just that you have more coins on the server you are on, which means there are more characters that get parsed and it reaches the character limit ?
Lobby line : ```java
" &8» &9Coins :&7 %vault_eco_balance%",
Mini Game line : ```java
" &8» &9Coins : &7%vault_eco_balance%",```
no
my coin system
is in my db
so
same coins
on all servers
cab you send your full scoreboard config ?
ok you sent me in dm... but do you know what is "line 4"? x)
/papi ecloud download Vault
/papi reload
i forget to put my eco plugin --'
bruh
i already have vault installed
and the PAPI expansion ?
oh it works now
cool
function getTag()
{
var argument = args[0].toLowerCase();
var tag = args.length === 2 ? args[1].toLowerCase() : "null";
switch (argument)
{
case "name":
if (tag === "tag")
{
return "&e&lVicious&6&lMC";
}
return "ViciousMC";
case "buycraft":
return "buy.ViciousMC.serv.nu";
case "ip":
return "ViciousMC.serv.nu";
case "donator":
return tag === "tag1" ? "&f&lIron" : "!!! INVALID ARGUMENT !!!";
default:
return "!!! INVALID ARGUMENT !!!";
}
}
getTag();
How can i add a 3rd agument to this ?
i've tried this but it goes to the Invalid argument when i try %javascript_custom_server,name,tag%
var arg0 = args[0].toLowerCase();
var arg1 = args.length === 2 ? args[1].toLowerCase() : "null";
var arg2 = args.length === 3 ? args[2].toLowerCase() : "null";
switch (arg0)
{
case "server":
if (arg1 === "name")
{
if (arg2 === "tag") {
return "&e&lVicious&6&lMC";
}
return "ViciousMC";
} else if (arg1 === "buycraft") {
return "buy.ViciousMC.serv.nu";
} else if (arg1 === "ip") {
return "ViciousMC.serv.nu";
}
return "!!! INVALID ARGUMENT !!!";
Hey, whats the placeholder to show world time? like 7:00 pm
thank you ^^
its prob built into the plugin
@austere hawk that last screenshot is useless, please provide more information of what you're trying exactly
Hello. I'm having problems with the playtime place holder. I've tried running the command multiple times, and still no luck. Any help would be appreciated
@kindred palm Any errors?
@sharp jay, I haven’t noticed any errors... let me look at my console tho and double check
custom
i am making my own chatformat plugin and want to add all placeholders to it
so u can add which u want
if i can say it like that
like %vault_prefix%
%player_name%
etc
@fiery sapphire have you added support for placeholderapi?
yeah
Make sure you have it all
done with that
How do i add so when people add a placeholder to the chatformat
it comes there
instead of being the %
@final shadow
Just wanted you to know, %pinger_isonline_....% works fine, but %pinger_online_.....% with the same ip etc, doesnt work..
@drifting nimbus,
Please respect the rules, be patient and don't ping staff members!
Its a bug/issue
expansion?
On PAPIs side
ex: /papi ecloud download vault
then you clearly havent supported papi into your plugin
public void onJoin(PlayerJoinEvent event) {
String joinText = "%player_name% &ajoined the server! He/she is rank &f%vault_rank%";
// We parse the placeholders using "setPlaceholders"
joinText = PlaceholderAPI.setPlaceholders(event.getPlayer(), joinText);
event.setJoinMessage(withPlaceholdersSet);
}```
This tho?
You still have to have both expansions on the server.
^
@sharp jay with the scoreboard plugin (which is why I’m using the API) it shows a “java.io.IOException: Server returned HTTP response code: 403 for URL: https://spigotmc.org/api/general.php” but no error returned from the PlaceholderAPI
@kindred palm make sure its the right expansion 🙂
Is that a plug-in I need to install, or is it a command I run in the server
to be able to use the placeholders you need to install the right expansions to placeholderapi
example: /papi ecloud download player
@fiery sapphire vault & player expansion
Okay. So yes I installed the /papi ecloud download playtime
why would i need both?
I did %vault_prefix% %player%
Well, you need the expansions to parse placeholders on it.
%player% is custom
@kindred palm type /papi reload
Ok. Do I need to restart the server?
shouldnt need to but try
wait
i dont think i have placeholders installed in this plugin xD
Hhahaha
its not 😂
@kindred palm then most likely that plugin has outdated placeholders contact the dev
public void onJoin(PlayerJoinEvent event) {
String joinText = "%player_name% &ajoined the server! He/she is rank &f%vault_rank%";
// We parse the placeholders using "setPlaceholders"
joinText = PlaceholderAPI.setPlaceholders(event.getPlayer(), joinText);
event.setJoinMessage(withPlaceholdersSet);
}```
Do i need to add PlaceholderAPI.setPlaceholders?
@sharp jay are the people here not the developer?
Yes, that's how you parse the placeholders @fiery sapphire
@kindred palm the expansions are made by the plugin developers 🙂 Clip is the developer of placeholderapi and various other plugins
Okay
PlaceholderAPI.setPlaceholder(Player, String);
A player instance which the placeholder will be parsed for, and a string which contains the placeholders to be parsed
So i need to add all of the placeholders i want?
No, you just put the message there, and if it contains any placeholders they will be parsed
oh okay
thanks
btw
/*
* We register the EventListeneres here, when PlaceholderAPI is installed.
* Since all events are in the main class (this class), we simply use "this"
*/
Bukkit.getPluginManager().registerEvents(this, this);
} else {
throw new RuntimeException("Could not find PlaceholderAPI!! Plugin can not work without it!");
}```
Do i need this?
Read what it says..
Hello,
I am trying to display the following string on a Scoreboard:
"&c10% XP Boost: %luckperms_inherited_expiry_time_mcmmo.perks.xp.10percentboost.all%"
It would appear by adding the % sign after the 10 breaks the API call
Is there a trick to add the % value and not interrupting any PAPI calls to plugins?
I've tried things like this, but it doesn't do the trick
"&c10'%' XP Boost: %luckperms_inherited_expiry_time_mcmmo.perks.xp.10percentboost.all%
have you tried just putting the %
how to get the kitpvp placeholders working in PlaceholderAPI ? https://www.spigotmc.org/resources/leaderheads.2079/?__cf_chl_jschl_tk__=73481eaa845ecafdce37931362f3e2ace680b01a-1589492778-0-AZWwE4faYAqsM0hCR1Og3FCiDj9_Lbh6WpIfYflO_ybDb7zbxRtXupQ9za5EyiA7z_EmdoPzbk3Ie7RPusLpRVUoFiHusJT2qsx7JLULADBQL9jgTze8_stUtChaiV80diMfO641hMzOaDgI8NAJbKG6IW9uxa6HJ0daH18tLc60RpIp_tQCpS0VWIQGnfM8M6qQ3LUPm19UDRrC5ZW1g2FcFWZV04EM3XDYlDah9VUnh643oUW65DR6h0sDrqMYEtxNArLxlYWKEJ1Vor2ZkwEAYkqAWwvC8dQjjDSNTGYtVbJcjbKqK_IaZFVYOW6ZeQ
just use this placeholder %kitpvp_stats_kills%
or any of these :%kitpvp_stats_kills% - The kills of a player %kitpvp_stats_deaths% - The deaths of a player %kitpvp_stats_kdr% - The kill : death ratio of a player %kitpvp_stats_level% - The level of a player %kitpvp_stats_experience% - The experience of a player %kitpvp_player_killstreak% - The player's current kill streak %kitpvp_player_kit% - The player's current kit
Thank you sooooooo much you helped me 😊
well they were all on the kitpvp page
Hello, I'm looking do to a rather simple thing in theory but it's kind of complicated in real life:
Putting a FactionUUID variable in a scoreboard: the faction's name the player is standing in
Simple right ? Well not that much:
First solution: I first tried to use the inner scoreboard of FactionsUUID, but the placeholder I'm looking for is not in the list (https://factions.support/placeholders/)
Second solution: Using the Featherboard scoreboard with MVdwPlaceholderAPI, but there is not this kind of placeholder here either ! (https://www.spigotmc.org/wiki/mvdw-placeholders/#factions1-6) Well in fact it does have the {factionsuuid_locationfaction_name} placeholder, it's working fine but it's all blank, losing all the purpose of displaying the faction name in the scoreboard.
Third solution: Using PAPI: On this page (https://factions.support/placeholderapi/) FactionsUUID says that we can use the following placeholder %rel_factionsuuid_relation_color% with PAPI. Great, that's exactly what I want ! Now I just need to use it in Featherboard with the {placeholderapi__*} placeholder, so it would look like this in my Featherboard config:
- '{placeholderapi_rel_factionsuuid_relation}'
Any other PAPI placeholder works except the 2 relational placeholders
Any help would be greatly appreciated
@glossy jasper don't quote me on that, but I don't think maxims papi works with relational placeholders, hence the result
Perhaps you could trick it by using javascript and parsing it for the player yourself
@brisk coral Unknown expansion.
Probably internal
Does anybody know a better placeholder for money. The one we use currently caps at $999Q, at $1000Q it just turns into it becomes unformatted " 1000000000000000000 "
%vault_eco_balance_commas% @golden trench
Welcom)
Uh I dont think you understood what I meant aha
I just used it and its now listed it as 1,000,000,000,000,000,000. I meant I was after a placeholder that would set it to $1QT
javascript
javascript placeholder
Make one which continues the number, also any particular reason you're using such a high eco?
Purely to entheses its an OP prisons server, we like it this way makes it feel much more OP. Also I have no idea how to make a javascript placeholder
Guys, help pls with <SimpleDateFormat>
In %server_ time__<SimpleDateFormat>%
If i need to show only mins and secs
What do i need to type there?)
hello guys why i get errors when i use luckperms placeholders wiht deluxe menu
?luckperms
This error occurs when there is a mismatch in versions between the expansion and luckperms itself.
Make sure you have the very latest LuckPerms and the latest LuckPerms Expansion.
Once installed restart your server.
If you want to keep using v4 please download the version 4.1 of the LuckPerms expansion.
i got the latest version
is there a language.yml file i can edit the papi messages in? or is it hardcoded in?
@austere hawk,
Please respect the rules, be patient and don't ping staff members!
no need for a ping ... it says on the spigot page that latest supports everything from 1.7 to 1.15.2
Would help if you showed the error you're getting if it doesn't work
yeah
also what doesn't work? the plugin or the expansion?
that is not placeholderapi
that is prison
?help
» Give the helpers some details
» Ask suitable questions
» Be polite
» Wait
im confused, using https://www.spigotmc.org/resources/holograms.4924/
and trying to add placeholders, so i installed papi, protocollib and Holograms-Placeholders
but its not working
yes i downloaded plyaer /papi ecloud download Player
Also do you have the dancing meme on your server?
haha no?
i swear i see it right there
oh wait
yes the coffing guys
lmao
No idea, I recommend Holographic Displays and Holographic Extension for holograms
I know those work ^
if you want to make sure it's not PAPI, type /papi parse me %player_displanyame%
no, you just linked me the plugin you have
oh the extension thing worked!
👍
thank you
@mint fable Why tho..
why what tho
yo
placeholderapi says my expansion is installed
but the parser isn't loading it
parser shows this https://gyazo.com/ff3c860ea774177a222b1dcb3d96c825 here is my placeholders class https://hasteb.in/oqekolew.kotlin here is where i register it onenable https://gyazo.com/7917b7cd4026f9466dab895bfb3d5e45 (it says successfully hooked)
anybody have any idea?
Or maybe I have to restart for it to work idk
This is in your plugin?
Have you debugged it?
Try returning a string at the top, see what happens
kk ! ty
Anybody know how to make "cooldown" for certain items? (example a Diamond sword named Valhalla, grants heal 3 during 5seconds with 90s cooldown. being able to put in a scoreboard or somewhere. Like "Valhalla: 1:30s" and etc
Just as you can do with "Enderpearl" and "Gapple"
how do i use placeholders inside other placeholders like i want to use %tokenenchant_fortune_cost_{javascript_cost,fortune}% but i cant get it to work
how do i use placeholders inside other placeholders like i want to use
%tokenenchant_fortune_cost_{javascript_cost,fortune}%but i cant get it to work
@tall hinge the placeholder must allow to use other placeholders inside itself
if it doesn't allow it, you can't
@thin vault, Vous avez donc redémarré le serveur et cela ne fonctionne toujours pas?
Oui j'ai redémarré le serveur et rien ne fonctionne
Quelque chose dans la console pour donner un avertissement ou une erreur?
Je ne sais pas je vais aller vérifier je vous tiens au courant
D'accord, pas de problème. S'il y a des erreurs, il suffit de les publier sur ce site
=paste
Please use a paste service to share configs, errors, code and long logs.
• HelpChat Paste
Merci @tender vapor
Je viens de démarrer mon serveur et je n'ai vu aucune erreur venant de placeholder
Y a-t-il eu des erreurs?
Oui mais avec un autre plugin (multiverse) permettant d'avoir plusieurs monde sur un seul serveur
Sinon je pourrais vous inviter sur mon serveur vous rendre opérateur
Mais aucune erreur de placeholderapi? Si c'est le cas, c'est vraiment étrange, je ne sais pas si quelqu'un avec le rôle de support pourrait être en mesure d'aider
Je me suis peut être mal débrouillé
Je vais aller sur mon serveur mais plus tard car chez moi il est deux heures du matin et je vous tiendrez au courant si le problème persiste
@brisk coral Connaissez-vous bien placeholderapi? Pourriez-vous aider du tout?
@desert trench,
Please respect the rules, be patient and don't ping staff members!
D'accord, il est 1h du matin pour moi. Haha.
@desert trench, @thin vault Read the rules, or don't talk in this channel. Also don't ping for no reason.
I didn't ping you for no reason, why you ping me for no reason? I was sleeping
To me it looks like for no reason.
And "I was sleeping" while chatting in other channels doesn't really make sense, does it now
Is there a placeholder from autosell for like QT, etc. (bigger than Quadrillion) cause I need it for my Prison server.
I got this
[PlaceholderAPI] KoTH is currently using a deprecated method to hook into PlaceholderAPI. Placeholders for that plugin no longer work. Please consult [SubSide] and urge them to update it ASAP.
I thought this was the place where to say it :P
@austere hawk #spigot-linking
Yeah I still dont know what to do about that QT issue, maybe somebody knows a way to make a placeholder extension that will add it for us?
Pinger expansion gets the server.properties MOTD of a server or the motd that can be edited by a plugin ?
???
I already asked one day and Funnycube told me that it wasn't possible and that the motd plugin has to create its own placeholder for it, but Frosty said that there may be a method to get the actual motd
i'm having trouble getting my plugin to hook into PlaceholderAPI, could I go over what I'm doing with one of you to see where I'm going wrong?
my hook appears in /papi list, but the identifier itself is not working in /papi parse <username> <string with identifier in it>
can you tell me how to show online in a certain world with the help of a placeholder?
please
Is there placeholder for player's version ?
there is if you use ViaVersion I think
or for ProtocolSupport
nope, not for ProtocolSupport
ty
Can someone help, all placeholders broke out of nowhere, no changes were made
Server would start with none of the placeholders working, and when reloading i get this message
Caused by: java.lang.NoClassDefFoundError: net/sacredlabyrinth/phaed/simpleclans/SimpleClans
Hi when I try to enter this: /papi ecloud download Player it just says this: No expansions available at this time
ah thanks
download and pop it in the /plugins/placeholderapi/expansions folder
Is there is any placeholder, that can show 1 text if player have permission and show another if he doesn't?
%player_has_permission_<permission>%
thatll return yes/no depending on what uve set as the Boolean setting in papi config. if u wish it to say something different then u can use javascript
So there is no? I found something called RelCon. But i should have 200iq to figure how it's working
i'm having a rough time getting my placeholder to show in the chat. the hook shows up in /papi list, but whenever I try to use /papi parse <my_username> %<identifier>%, it just shows %identifier%, not the output that it's meant to show
i'm sure i'm doing something very simple wrong, but after digging through the on the github wiki for PAPI, i still haven't been able to pinpoint where exactly i'm going wrong
do any of you know what the issue could be?
what placeholders are u trying to use?
my assumption is that u need to download the expansions for the corresponding placeholders
how
what placeholders are u trying to use?
none work
but
vault
atm
ive tried like 10 scoreboard plugins
and all the default placeholders
dont work
KiteBoard
Do you have the vault expansion?
And make sure you have the expansion
/papi reload```
thanks ill try
do you know what the issue might be if a plugin is listed in /papi list but its identifiers aren't working?
anyone know what's this NPE about?
https://pastebin.com/fihnRSsp
@primal vault,
Looks like your server can't connect to our API,
Should your host not allow connections to the PlaceholderAPI eCloud, you can manually download expansion from https://placeholderapi.com/ecloud and place them in your /plugins/PlaceholderAPI/expansions/ folder.
do as the bot says^
Hello, i already downloaded the expansions but the placeholders dont seem to work
Could not find artifact me.clip:placeholderapi:pom:v2 in spigotmc-repo (https://hub.spigotmc.org/nexus/content/repositories/snapshots/)
Anyone else get this error when importing
hi
i have a issue
with pinger
%pinger_online_46.105.172.144:25565%
detect offline but my server is onlin e
What you mean @austere hawk
Your server is offline yet papi still thinks it's online?
strange
hello. im trying use placeholders in a hologram for bedwars1058
and it seems its not working?
Hey how do i get time and date in real life with placeholders?
uhmm
-papi localtime
thank you
How to check placeholder from JS with arguments? If i check %player_has_permission_test% it returns true, but when i run %player_has_permission_" + args[0] + "% with arg test, it's returns false
The most strange, that if i give player op, it's returns true
With return "player_has_permission_" + args[0] + "%"; without first %, it's returns player_has_permission_test%, so it's looks correct
Is this a bug? or there is some special method to do that? can some one check?
https://paste.helpch.at/oqenabayul.js
it doesn't work because the placeholder doesn't get parsed
so it doesn't return true but itself
How can i do that?
it doesn't work because the placeholder doesn't get parsed
@junior musk hhhhm. but as i say, if i give player OP, it's retutns true
so it's parsed
`>papi parse Darwinian %javascript_permtext_test%
[16:46:06] [Server thread/INFO]: false
op darwinian
[16:46:13] [Server thread/INFO]: Made Darwinian a server operator
papi parse Darwinian %javascript_permtext_test%
[16:46:15] [Server thread/INFO]: true`
I think it's getting parsed before arg resolving somehow. But how to fix that
You have to parse the placeholder yourself, and I think string concatenation is kinda cucked in js (or atleast it is for me)
try to use player.hasPermission(arg[0]) instead
@junior musk that is a good idea. and it's working
and i think it's faster, than parsing string
One more thing. I'm using cooldown script from js page. It's working, but sending [Server thread/INFO]: Incorrect usage! /papi help on every use. It is normal?
what command did you use ?
papi parse %player_name% %javascript_cooldown_1_start%
what's your PAPI version ?
2.10.6
🤷♂️
Looks like it's DM bug. Any placeholder, that's getting parsed from menu with [console], sending that message
ooops, no. only cooldown
So it's cooldown bug 🙂
or maybe all javascript placeholders ?
Hi so me and a few mates are having a minecaft tournament every week. Today we just did our first run of it and the main feature people want is teams where 2 people are in a team and there points get added together. Currently we're using Essentials economy to handle adding and changing points and the vault eco bridge that stores it on our sql database for cross server points. In the lobby we're using leader heads to display the points with citizens. What would be the best way to add two players points together simmilar to something like minecraft monday did. I asked the dev of the leaderheads plugin and he said the best way to do this would be through a custom java script placeholder. I've never messed with custom placeholders before but I have dabbled in a small amount of JS before but it's not my main language. But how would I code something like this with the placeholder api? I have seen the math placeholder but I can't think of a way to implement that.
when you say "add two players points together", you mean the result of the 2 ?
Yes
if yes, then you could use the Math expansion
%math_{placeholderForPlayer1}+{placeholderForPlayer2}%
How do I get an individual players balance? I can only see how to get their top score
is there a placeholder to show how many blocks in an area? i want to show how many chests are in certain worldguard zones
Hello, not a massive problem but just curious - does anyone have a way to add up multiple variables?
Assuming the maths expansion has something to do with it, but I have no idea how to format it
Okay just figured it out :o
But, how do I remove the decimal places?
[precision:0]
[precision:0]
@junior musk You godsend. Thank you so much.
For reference, if anyone (for some reason) needs this: %math_{bungee_server1}+{bungee_server2}[precision:0]%
Is there a way where I can use the place holder api in command blocks?
like soreing it in a scoreboard afterwards?
Having a weird issue and I don't specifically think its coming from PlaceholderAPI itself but hope to get a little bit of understanding out of it.
I'm currently running HolographicDisplay and HolographicExtensions (Both latest and up to date)
Out of every single placeholders I've tried, everything works great but accept one. The countdown placeholder doesn't seem to want to work sometimes and I'm unsure whether its an issue with PAPI or the plugin thats supporting PAPI.
Oh yikes
Is there a way where I can use the place holder api in command blocks?
@sharp saddle I don't think that's possible no
Having a weird issue and I don't specifically think its coming from PlaceholderAPI itself but hope to get a little bit of understanding out of it.
I'm currently running HolographicDisplay and HolographicExtensions (Both latest and up to date)
Out of every single placeholders I've tried, everything works great but accept one. The countdown placeholder doesn't seem to want to work sometimes and I'm unsure whether its an issue with PAPI or the plugin thats supporting PAPI.
@austere hawk do you have ProtocolLib too ?
Absolutely. Have it installed and latest for 1.15.2
Oh I haven't try that out yet, let me go test that now.
Gonna just give this a try
Oh cool that worked.
and it doesn't work on Holograms ?
wait what placeholder is that?
So it does parse through. I should've guessed that earlier on, using it on DiscordSRV, it shows up just fine. But through HolographicDisplay/HolographicExtension, it doesn't parse and just remains as %server_countdown_dd.MM.yyyy_28.09.2020%
ah
I mean i didn't know about the cowntdown one
but can you test other palceholders?
like %player_name%
to see if those work?
Yep
Okay that took longer than expected xD
But yeah, as said up top. Every other placeholder works absolutely just fine
But the countdown is janky at best.
And I can't tell whether if its the plugin thats parsing the placeholder or if its an issue with PAPI.
Cause on DiscordSRV, it runs just fine. It loads up the placeholder perfectly and displays the countdown correctly.
http://prntscr.com/sild1y << DiscordSRV
yeah
the problem is HE
I already reported
this problem
on github
and all we can do is wait for a fix
Ah I see. But there is another question that I would like to ask and this might be a bit confusing to understand as this plugin hasn't been released to the public yet by the developer whos making it but
I'm no developer so I won't have much understanding towards how it works but an error or diagnosis would be great.
The top placeholder that is displaying the countdown correct is %server_countdown_dd.MM.yyyy_28.09.2021%
It loads up 2021 perfectly fine.
But, the bottom one.
%server_countdown_dd.MM.yyyy_28.09.2020%
It just rounds it down to zero.
And I'm pretty sure I'm not tripping out but I'm still living in 2020 so was wondering is there any sort of explanation towards why it happens?
I'm getting an unknown unary operator with this placeholder
%math_{%parseother_{player1}_{vault_eco_balance}%}+{%parseother_{player2}_{vault_eco_balance}%}%
But I don't see the error...
https://imgur.com/a/fX6cmDK
remove the inside the math expression
you only need the one around the whole placeholder
%math_{parseother_{player1}_{vault_eco_balance}}+{parseother_{player2}_{vault_eco_balance}}%
try this
wait wut
you used player1 and player2 as player names to get the money, but since they aren't real player bames it won't work x)
https://imgur.com/a/oTnRDW0
Still getting the same error.
🤔
I think I may know why
but then idk how it would be possible
I think it's because of the {}
wait
can you show /papi list ?
is ParseOther in it ?
yeah I thought if that first
%math_{{parseother_{player1}_{vault_eco_balance}}+{parseother_{player2}_{vault_eco_balance}}%
but I was wondering that maybe it was because ParseOther doesn't work too idk
🤔
I know !
js is always the answer !
😂
you could make a js script that does parseother placeholder 1 + parseother placeholder 2 without having to use the math expansion
so it doesn't interferd with the {}
Same error, I tried what @turbid tide said but same error but now it says unknown unary operator '{{' at position 1
yeah as I said that is a problem with the math expansion
you would need js then
I can't do it right now, I'm in my bed with my phone, if nobody does it until tommorow I'll do it for you if you want
function math() {
return "%{parseother_{player1}_{vault_eco_balance}%" + "%parseother_{player2}_{vault_eco_balance}%"
};
math();```
⏫
/papi ecloud download Javascript
/papi reload
go into your PlaceholderAPI folder in your plugins folder
open javascript_placeholders.yml
add this at the bottom:
math:
file: math.js
go in the javascripts folder and create a file called math.js and add everything that BlitzZ said in it
%javascript_math%
but one thing
you aren't using player names in your parseother placeholders
you are just using player1 and player2
so you might want to change them
What would be a way to allow me to put the playernames in the placeholder insted of the js file?
idk if that's possible
but you can use a placeholder as player name in the parseother placeholder (in the js file)
hi
i have a issue
with pinger
%pinger_online_46.105.172.144:25565%
detect offline but my server is onlin e
all adress ip say offline
I think you have to wait a bit
like 30 seconds or something
until it updates
pinger:
offline: '&cOffline'
check_interval: 30
online: '&aOnline'
``` you can change the interval in `plugins/PlaceholdersAPI/config.yml`
@austere hawk,
Please respect the rules, be patient and don't ping staff members!
Hellloo
How to get ezrankspro to work with papi?
So I cant just get the question answered?
What is the papi download for EzRanksPro?
Cause EzRanksPro doesn't work
I didnt buy it. I am a dev on a server and the Owner bought it.
Im just asking for a command.
Not the owner of the server?
If you're not the owner of the server and you're the one requesting the support you'll need to first get the owner who purchased the plugin to join and run through the verification system listed in #spigot-linking, once linked they just need to give us the thumbs up that you're with them.
Ive never seen a support team being this lazy.
If you're not happy with the rules, you're more than welcome to leave.
So I have a paying customer, as I am looking to do my job. I cannot get a simple command. I will just ask around. The Owner is asleep and the server is due my 12pm EST, so I guess I will just find someone not here that will help.
I will be sure to never have any of the server Owners I work for buy this
Sorry you can't follow simple rules mate.
Its not a rule
There are people out there that pirate stuff all the time and we don't want to provide support for them, so we ask for verification.
- Be respectful to everyone.
- Have patience when asking for help.
- Stay on topic where required.
- Be mindful of swearing, only use it moderately.
- Follow staff directions.
- Stick to English only.
- Follow the Discord Guidelines found here: https://discordapp.com/guidelines
Where does it say the rules?
This channel is called "Placerholder-API"
my apologies
Yes and it relates to one of our premium plugins.
Nope, but listen to staff is.
I'm not going to sit here and argue with you.
Not the owner of the server?
If you're not the owner of the server and you're the one requesting the support you'll need to first get the owner who purchased the plugin to join and run through the verification system listed in #spigot-linking, once linked they just need to give us the thumbs up that you're with them.
So follow the rules and get the owner to verify, or do exactly as you said and try to receive support elsewhere.
Perfect, we're here 24/7 as you said.
The server is opening tomorrow.
We have perfectly clear steps to follow when he wakes up in #spigot-linking
Yep okay. I will be sure to delay the whole server opening over 1 command.
Nice!
Btw update the rules
Its not in there
Thats where people go to find out what they can and cannot do.
Well you are partaking in an argument that staff do not find beneficial, so, we'll just end it there.
I need help
Theres not time to wait! Ask your question @hollow fox!
I have a question
Theres no time to wait! Ask your question @hollow fox!
Where can I buy EzPrestige
Ouch MCMarket is selling it for $6.50 oops
Oh?
Yea but I wont send the link.
i see nothing on mc-market for it
That is agaist the rules.
If you want, you can send it to barry
Its not called EzPrestige
No, sorry. Thats a pirated plugin that means. I don't partake in that.
Good work, you're learning to follow rules! 😄
See, was that so hard?
Also not really sure how that's pirated, LOL.
Literally a different plugin.
any prestige plugin is ezprestige and clip owns all
Fax
Thats not true...
😮
We're not rude
They're having a joke
Name calling isn't really a joke.
Lying about the rules isnt a joke
Wrong time?
my name isn't even lazy!
backs out
You just missed the introduction, that's all.
verify? 😮 happy days
All caught up thanks cj
Also, not listening to staff is against the rules for your information.
So when Glare asked you to link the spigot account, and you didn't want to co-operate, that's included.
Are there Terms of Service when purchasing this?
Im gonna buy it so the Owner can get his server on time
So you can keep going on and on about it, but my recommendation is be patient and wait for the owner to be awake. Also realize that not everybody's schedules revolves around you.
Are there Terms of Service when purchasing this?
@hollow fox
Im gonna buy it so the Owner can get his server on time
@hollow fox
Hello?
Help me please
I thought there was 24/7 support.
I apologize.
Please answer my question.
"This expansion cloud is not enabled"
A resource that allows information from your favorite plugins be shown practically anywhere!
• Spigot
• Wiki
• Placeholder-List
• GitHub
• eCloud
Download it manually
make sure to /papi reload
Im gonna buy it so the Owner can get his server on time
@hollow fox why leave it to the last minute
Odin, stay out of this.
I didnt
Sorry
Its called this is the last part of the server
My bad @trim mist
Literally thats all I have to do
Your /papi ecloud download EzRanksPro doesnt work.
What's it say?
"This expansion cloud is not enabled"
Papi
cloud yes. I have others downloaded too
Interesting, you mind if I grab a copy of your startup log?
Yea sure let me restart it quick
Please use a paste service to share configs, errors, code and long logs.
• HelpChat Paste
A member of staff has requested I move your pastebin.com paste to our paste.helpch.at!
Seems there a bit missing from that log
Like?
Cause when I download the expansion it just causes an internal error
for the papi plugin
All the enable messages are missing
and the Done! message is also not there
Correct
Error should be a few lines long
Some consoles like to hide errors, so you might need to grab it from the log file
If you send over the full startup log we should be able to locate the issue ^
@hollow fox,
This error occurs when there is a mismatch in versions between the expansion and luckperms itself,
Make sure you have the very latest LuckPerms and the latest LuckPerms Expansion
Once installed restart your server.
A member of staff has requested I move your pastebin.com paste to our paste.helpch.at!
Update the luckperms expansion and luckperms to their latest versions
That should fix those errors
LuckPerms is at the latest version, I will update the expansion now. Hopefully it does
Whilst you're updating things suggest updating PlaceholderAPI aswell
seems ur on a build form 2018
before a few critical things were fixed
Okay, thank you! It fixed it! What are the placeholders for a scoreboard? The ones of the EzRanksPro website don't work
Spigot*
Thank you!
!placeholders
=placeholders
So, what is the perm node to allow a player to rankup? Cause I did ezranks.rank.[Letter] for every single one and it just boosted them all the way up.
If I dont do that then they dont rankup
They just stay at A
You'll need to link your spigot via #spigot-linking to get access to #ezrankspro support 😉
Can you just say yes or no if I am doing something wrong?
no lol, that defeats the purpose of the verification
It's only there so we don't waste time on helping those who didn't purchase the plugin
Wouldn't need it if people didn't leak the plugin
bruh. i guess i will go buy it cause the owner is sleeping
Just wait till they wake up?
The server releases tomorrow. I wont have the time to do it when they wake up.
So I just spent $11
over a simple question
Blame the leakers and those who use the leaks over the system, not me
Just link your spigot and you'll get the role
ah, 1 sec
how to use placeholderAPI config placeholders ?
What do you mean?
Is there currently an issue with LuckPerms PAPI?
when i install it, and reload it says theres an error
=paste
Please use a paste service to share configs, errors, code and long logs.
• HelpChat Paste
> [07:06:32] [Server thread/INFO]: JackCrispy issued server command: /papi ecloud download LuckPerms
> [07:06:32] [Server thread/INFO]: [PlaceholderAPI] Attempting download of expansion: LuckPerms by user: JackCrispy from url: http://api.extendedclip.com/media/Expansion-LuckPerms_IaULsEO.jar
> [07:06:32] [Server thread/INFO]: [PlaceholderAPI] Fetching available expansion information...
> [07:06:32] [Craft Scheduler Thread - 67/INFO]: [PlaceholderAPI] Download of expansion: LuckPerms complete!
> [07:06:32] [Craft Scheduler Thread - 68/INFO]: [PlaceholderAPI] 174 placeholder expansions are available on the cloud.
> [07:06:36] [Server thread/INFO]: JackCrispy issued server command: /papi reload
> [07:06:36] [Server thread/ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'papi' in plugin PlaceholderAPI v2.10.6```
That can't be the whole error
Try deleting all the expansions, and redownloading them
@knotty pulsar,
Please respect the rules, be patient and don't ping staff members!
Hey there c:! Is there a way to sum up placeholders in DeluxeMenu? (something like %bungee_survival15% + %bungee_survival16%)
Frosty, do you know ab my issue?
Try reinstalling papi (with a fresh download)
if you want a list of all your bungee survival servers you can try this @rapid tinsel
just change it up a bit
that was made for servers named sw1 sw2 all the way to 30, plus skywars1 up to 3
Thank you very much
Frosty i set - '%{plotsquared_currentplot_owner}' in TitleManager. It says it supports PAPI
But it doesnt show
%plotsquared_currentplot_owner%
that's how PAPI placeholders are used
on a plugin that supports them
But in TitleManager it says use
then you maybe didn't download the expansion
I did
you type /papi reload
they use %{}
ah alright
Thanks 😄
One more
how can i show if the value is null , custom text
because going on a road
javascript
you have to go to plugins/PlaceholderAPI/javascripts_placeholders.yml and add: road: file: road.js Then you save and do /papi reload and go to plugins/PlaceholderAPI/javascripts and refresh the folder. You will see a new file appear called road.js. Open that file and add in there: function road(){ if ("%plotsquared_currentplot_owner%" != "") return "%plotsquared_currentplot_owner%"; return "&cRoad"; } road(); Then save and do /papi reload again and then you can use the placeholder %javascript_road% instead of %plotsquared_currentplot_owner%. Btw it will return "&cRoad". when you are not on a plot. You can just change that to anything you want.
@knotty pulsar ^
Nope
oh
I think
you need to do /papi ecloud download Javascript /papi reload
then refresh
the fold
and it should appear.
hi
i have a issue
with pinger
%pinger_online_46.105.172.144:25565%
detect offline but my server is onlin e
@austere hawk I had the same problem 2 days ago and I fixed it by realising that the expansion needs to have PlaceholderAPI with the Pinger expansion on the other server that you ping
@turbid tide there is no javascript extension
what does it tell you ?
No cloud expansions are avab at this time
can you check /papi ecloud status ?
Said the sme thing
try /papi enablecloud
The cloud is already enabled!
can you check console ?
Nothing in console
but i downloaded two extensions
when ?
5mins ago
You can manually download it
or else download it from here https://api.extendedclip.com/expansions/javascript/
and put it in your /plugins/PlaceholderAPI/Expansions/ folder
and then do /papi reload
also make sure there isn't one in there already
like the same one you downloaded
👍 of course it does 🙂 It is made by me ... and things that I make always works perfectly 😦
It is made by me ...
what is made by you ? the JS Expansion ? I thought it was clip 👀