#placeholder-api
1 messages ยท Page 90 of 1
I'm sending a message on join like so ```message: "%someplugin_placeholder1%"
And it doesn't send the placeholdr
I mean are you parsing the placeholder before sending the message?
How do I do that?
PlaceholderAPI#setPlaceholders(Player, String);
Is that meant to be on the onEnable() method?
oh
if(identifier.equals("placeholder1")){
PlaceholderAPI.setPlaceholders(player, identifier);
return plugin.getConfig().getString("placeholder1", "value doesnt exist");
}```
Like so I suppose?
Tried doing it like so
joinText = PlaceholderAPI.setPlaceholders(player, joinText);
player.sendMessage(joinText);
is there a placeholder that exists which converts the player's exp to levels
var exp = "%player_total_exp%";
function exptolvl() {
if (exp > 1395) {
return (Math.sqrt(72*exp-54215)+325)/18;
}
if (exp > 315) {
return Math.sqrt(40*exp-7839)/10+8.1;
}
if (exp > 0) {
return Math.sqrt(exp+9)-3;
}
return 0;
}
exptolvl();
How would i go about returning 2 decimal places here instead of a billion
idk but you coulf try to use the math expansion to remove all decimals
%math_{javascript_placeholder_you_made}[precision:2] % this would keep obly 2 decimal numbers
whats ur problem
My problem is when I download the LuckPerms placeholder I get this error in the console:
I send you the link in pastebin because it exceeds the word limit
=paste
Please use a paste service to share configs, errors, code and long logs.
โข HelpChat Paste
update to the latest PAPI as u are very outdated
Ok
Thank you I will try it and let you know
Thanks if it worked I appreciate it very much!
@junior musk you're a baller, that worked. ty
@junior musk just realized that wont work with mvdw {placeholderapi_... hmm
@sacred bronze .toFixed(2)
Hey guys, just wondering if there's a way to make it so %worldguard_region_name% will return Wilderness when in the __global__ region. Cheers
Javascript
So how does one get their Expansion verified?
@junior musk just realized that wont work with mvdw
{placeholderapi_...hmm
@sacred bronze
try}<calc round>{placeholderapi_yourplaceholder}</calc>
@dry citrus spam staff to check it lol
Hahaha fair enough ๐
Start with clip
ยฏ\_(ใ)_/ยฏ
Which version would I use for 1.14.4 I'm assuming the latest should work?
I'm currently using 2.10.4 trying to list, or download an expansion I'm getting No cloud expansions are avalable at this time
@dry citrus verified 
Thanks for using PlaceholderAPI.
Can anybody send me the wiki page that guides you on how to make a placeholder that can be used in other plugins that support placeholderAPI
Via expansion or inbuilt into the plugin?
Both are on the same page anyways
What should I use? I only need to create 1 placeholder
Thanks ๐
If you own the plugin you might aswell make it inbuilt
Alright I will, thanks again
So if I have this
if(identifier.equals("staff")){
return "ยงbยงlSTAFF";
}```
Am I able to use it in a different plugin that hooks into placeholderAPI
Yes. And by the way, you can use & there.
Ok thanks!
Caused by: <eval>:1 TypeError: Math.log10 is not a function
Do JS prototypes not work in the js expansion?
Anybody have a js function that formats custom currencies to k, M, B, T, etc. etc?
ya
I do
@mild radish
1 second
i mean, it's been 40 minutes so you might have one by now
I just added b, t, qd, and qn. Not sure if they work
function formatNum(num){
if(num>=1000000000000000000){
return (num%1000000000000000000).toFixed(2)+"qn";
}else if(num>=1000000000000000){
return (num%1000000000000000).toFixed(2)+"qd";
}else if(num>=1000000000000){
return (num%1000000000000).toFixed(2)+"t";
}else if(num>=1000000000){
return (num%1000000000).toFixed(2)+"b";
}else if(num>=1000000){
return (num%1000000).toFixed(2)+"m";
}else if(num>=1000){
return (num/1000).toFixed(2)+"k";
}else{
return num;
}
}
And it will show up as "50.23m" right now
if you want to change that, then change the toFixed(2) to toFixed(0)
Yeah didnโt want it with if statements, but I guess this is the only possible way. Thanks <3
@sacred bronze
try}<calc round>{placeholderapi_yourplaceholder}</calc>
@junior musk
completely forgot about mvdw effects, <calc round> did not work, however <round decimals="2"> did, thank you so much โค๏ธ
Why don't you want if statements @mild radish ?
Ah...
Bad joke ._.
I'm trying to put the time played statistic into titlemanager playerlist, but it just reads out as %statistic_time_player% instead of the actual amount of time. Anyone know how to fix?
@safe lava Do you have the expansion installed?
what expansion?
Statistic
does it show in /papi list ?
if not, do /papi ecloud download Statistic
and /papi reload
Every placeholder requires an expansion (you can get the expansion name from most by looking at the first word of the expansion) (unless the placeholders are built into the plugin), you can download the expansion using what Tangu just mentioned
yeah i did do that
and does it work if you /papi parse me placeholder ?
Double check the spelling of the placeholder
Doesn't matter with this one Tangu
doesn't it broke the expansion if it's not the right version ?
Copy the exact placeholder you're trying
%statistic_time_played%
Remove the s Tangu
thx, Idk why I always add a s lol
Cause it makes sense
that's true...
im loosing my mind trying to put together a jsontext for deluxejoin trying to get both a hover event and click event to work on the same text, can someone send me an example of how i would do that?
Join our Discord for Updates and to drop a suggestion! * is what im doing but when i take the output from that generator and parse it with a json parser it fails, and loading the output to DeluxeJoin it does not show that added line
["",{"text":"Join our Discord for Updates and to drop a suggestion! ","color":"yellow"},{"text":"*","bold":true,"color":"gold","clickEvent":{"action":"open_url","value":"url redacted to not promote my server"},"hoverEvent":{"action":"show_text","value":"Click Here!"}}]
this isthe json it spit out
ah
use this @somber willow
{"text":"Join our Discord for Updates and to drop a suggestion! ","color":"yellow"},{"text":"*","bold":true,"color":"gold","clickEvent":{"action":"open_url","value":"url redacted to not promote my server"},"hoverEvent":{"action":"show_text","value":"Click Here!"}}
i just realized this is the placeholderapi channel, my apologies
hey clip, you wonderful person, that is working all except the * character in the second text field does not show up in the motd, tried changing it to another character to no avail, any idea why that would be?
i had tried a T
{"text":"Join our Discord for Updates and to drop a suggestion! ","color":"yellow"},{"text":"t","bold":true,"color":"gold","clickEvent":{"action":"open_url","value":"url redacted to not promote my server"},"hoverEvent":{"action":"show_text","value":"Click Here!"}}
{"text":"Join our Discord for Updates and to drop a suggestion! ","color":"yellow"}&&{"text":"*","bold":true,"color":"gold","clickEvent":{"action":"open_url","value":"url redacted to not promote my server"},"hoverEvent":{"action":"show_text","value":"Click Here!"}}
thank you! that worked!

why you bad with poor cj ?
@junior musk i love cj i follow him on twitch
This is my requirement and when i have the item in my inventory, just declines it
http://prntscr.com/rcfl10
"si"
That's why, your placeholderapi config was changed
Can I see your papi config?
=paste
Please use a paste service to share configs, errors, code and long logs.
โข HelpChat Paste
alright
holy shit that worked
thanks alot, spent like 2 days trying to fix it lol
๐ most placeholders will return the value set in config
Always good information to know
Hello,
I have a problem of lags with placeholders : the baltop placeholder of vault.
If I create a Deluxemenus' menu where I use the variable
%vault_eco_top_balance_formatted_#%
it will work, but if I have more than 2000 players in essentials database, it will create lags each time I do /baltop
I'm using placeholderapi 2.10.4 and and paper 1.15.2 build 126
Well tbh no wonder its lagging with 2k, gonna have to improve that cuz I've done it badly ๐
Cache the top
Only a certain amount
Like the top couple hundred
Anyone else is irrelevant
Then just have a task run to get the top
Call it async every so often
Update cache with new results every time and should be good
That way the actual placeholder only gets a value from the map
exactly what i wanted to do
damn. clip has reformed :()
Oh cool, yes its in vault
I remember ive improved that part recently, dont remember if I merged the PR or not
if you have free time, there's an issue with enjin expansion too. would be great if you checked it
ya
so we need a new papi update to add these options?
you can just add this method to an expansion
and it will generate a config section in the papi config
๐

downloaded ๐
Is there an offline player expansion?
what u mean
A couple updates ago you released offline player support
clip are you changing the format on how you name your expansions
the player expansion already supports offline player support
for those placeholders
vault expansion seems to be working fine for me too
What i am asking is for other expansions. Is there a way to return placeholders from offline placeholders from other expanions?
depends on the expansion
yeah
Clip can you setup jenkins build papi expansions from github when new code is pushed?
@final shadow on that vault expansion, it works but will display players in top list if that are exempt from baltop
@final shadow This is important ^
what do you mean "exempt from baltop"
i believe it is a setting in essentials so users cannot be shown on baltop
I don't recall how I set it up, but when I do baltop my user is not in list
that would have to depend on the essentials expansion to make a baltop placeholder then
this just uses vault to get all offline players balances
Wondering if there is a way to get the countdown message unformatted as to use the view_requirement in deluxemenus to check if it is zero or something along the lines
@near nimbus ess has a way to check that via placeholder
javascript?
what plugin or way are you tracking the countdown
the placeholderapi placeholder
%server_countdown_<SimpleDateFormat>_<time>% ex. %server_countdown_MM/dd/yyyy-HH:mm_10/11/2019-06:30%
your using a papi expansion
that does return 0 when it finishes?
i can't seem to remove the formatting (spaces and m, D, s, etc.)
thats what I was wondering
what does that return?
Ok then, its a string output: "0" not an integer.
Same result, nothing in the console either.
priority 2? is there more than two items in that slot?
more than two items
No. Switch priorities.
thought it was like luckperms weight for groups but its the other way round, gotcha. thanks for the help! โค๏ธ
can't see EZRanksPro on /papi list ๐
Run those commands @quartz orchid ^
i did
Any errors in console?
no errors tho
Please use a paste service to share configs, errors, code and long logs.
โข HelpChat Paste
@quartz orchid
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.
best bot, thanks man
hey! not a PAPI problem per se, but is there a placeholder for getting a random player's username?
I feel dumb why this does not work?
function always() {
if (p < 60) {
return p + " sekund";
} else if (p >= 60 && p < 120) {
return "1 minut\u0119 i " + (p-60) " sekund";
} else if (p === 120) {
return "2 minuty";
} else if (p === "W") {
return "Wkr\u00f3tce";
} else {
return "&cB\u0142\u0105d";
}
}
always();```
PLEASE ping me when someone answers. PLZ @austere hawk .
You forgot a + on the second return @austere hawk
OMG Thank you
using a javascript how would i remove .0-9 from a placeholder, example 154.5 turns into just 154
Get the number and return number.toFixed(0);
how would i do that?
var amount = "%placeholder%";
function fixAmount()
{
return amount.toFixed(0);
}
fixAmount();
Try if this works
Ah
There's a bit illogical in this somehow
Because 154.0 is double
And converting to int already fixed the decimal part?
hey I use the placeholder %server_time_HH:mm:ss%, but it shows me the wrong time.... so it shows me 10:47, but in my country it is 11:47 xD
How can I change the servertime?
It displays the time based on you machine/server timezone.
is there maybe a placeholder which shows the time from the player and not from the server?
Currently no. It's on my to-do list.
Hey
I have a ezrankspro issue
It comes up with that when you have op, is there a fix for this?
@somber quartz
Please respect the rules, be patient and don't ping staff members!
Sorry, done.
#ezrankspro
Does PAPI 2.10.4 work with LeaderHeadsRevamped? If I install PAPI on a fresh server with LeaderHeads it already shows the placeholders as available (but needing an update), but when I do papi ecloud download LeaderHeads it disappears completely and doesn't show as being installed
i running server 1.12.2
placeholder error say [Craft Scheduler Thread - 0/WARN] [me.clip.placeholderapi.PlaceholderAPIPlugin]: [PlaceholderAPI] Plugin PlaceholderAPI v2.10.4 generated an exception while executing task 11
java.lang.NullPointerException: null
@idle coral
@austere hawk
Please respect the rules, be patient and don't ping staff members!
show the full error message
i cant send picture
[22:27:47] [Craft Scheduler Thread - 0/WARN] [me.clip.placeholderapi.PlaceholderAPIPlugin]: [PlaceholderAPI] Plugin PlaceholderAPI v2.10.4 generated an exception while executing task 11
java.lang.NullPointerException: null
at me.clip.placeholderapi.expansion.cloud.ExpansionCloudManager.lambda$null$3(ExpansionCloudManager.java:181) ~[?:?]
at java.util.Map.forEach(Unknown Source) ~[?:1.8.0_241]
at me.clip.placeholderapi.expansion.cloud.ExpansionCloudManager.lambda$fetch$4(ExpansionCloudManager.java:172) ~[?:?]
at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftTask.run(CraftTask.java:78) ~[CraftTask.class:0a0b4b5]
at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52) [CraftAsyncTask.class:0a0b4b5]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) [ServerSchedulerReportingWrapper.class:0a0b4b5]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_241]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_241]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_241]
@austere hawk
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^
and these expansions actually work now?
make sure papi has been reloaded / restarted server
How do you access a placeholder inside javascript?
var placeholder = "%placeholder%";
Thanks
I'm trying to upgrade PAPI from an old version and the new system is insanely complicated compared to before
The wiki is pretty much useless
It doesn't even tell you what you just told me about the placeholder
There should be a lot more examples listed on there
There's a ton of javascript examples on it
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
Thanks, this is helpful
(you can find that under the Community Scripts on GH)
Yeah I guess I missed that before
You can't use // for comments?
Guess you have to use /* */ because it injests as a single line
You can use //.
Hello, is it possible to retrieve information from a player on bungee (on several servers) ??
PlaceholderAPI currently doesn't support bungee, so no
thank ^^
Does anyone know how to check if a player has a nickname? I've tried to check %essentials_nickname% != '' and %essentials_nickname% != player.GetName() and neither of those return true
Nevemind, comparing to p.getName() does work, I just had bad logic
if %essentials_nickname% != %player_name% I guess ?
I did this:
var name = p.getName(); /* actual name */
var nickname = "%essentials_nickname%";
if (nickname != name) {
nickname = ' &7(Nickname:&r ' + nickname + '&7) ';
}
else {
nickname = '';
}
== not =
I think
but why don't you use the in built nickname prefix from essentilas btw lol ?
If they are equal it means they have no nickname
I am using this in a mouse hover event to show both their nickname and their actual name
var nickname = "%essentials_nickname%";
var player = "%player_name%";
function hasNickname()
{
return nickname == "" ? player : player + " &7(Nickname:&r " + nickname + "&7)";
}
hasNickname();
Formatted as "Name (Nickname: NickHere)" or just "Name" if they don't have one
I suppose I could use a ternary operator
oof fancy then
yooo
why is it telling me "An Internal error occured when performing this command"
when I do /papi reload
Please use a paste service to share configs, errors, code and long logs.
โข HelpChat Paste
Please use a paste service to share configs, errors, code and long logs.
โข HelpChat Paste
remove the voteparty expansion from ur /placeholderapi/expansions folder
in 2.0 the expansion is built in
np
u can read the full changes of 2.0 here https://www.spigotmc.org/resources/voteparty-rewritten-1-8-8-1-15-x-30-launch-sale.987/update?update=313418
hey, is there a placeholder to get a player's current server?
or make the server in my server selector show up only if player not connected to it
Hello is there a way to put a Placeholder scoreboard in an amount? When I try it does not detect it and therefore passes the condition.
thanks a lot for your help
Wondering if there is a specific version that works best with Pixelmon Reforged 7.2 and Spigot 1.12
I already loaded the most recent version on my server and it didnt seem responsive
@floral geode A bit more info than that would help
Wondering if there is a specific version that works best with Pixelmon Reforged 7.2 and Spigot 1.12
@pulsar zodiac Pixelmon is a minecraft Mod, Spigots uses plugins not mods
@junior musk Okay well I put everything in a mods folder so its a force of habit
Im looking for the best placeholder-api version that works best with Spigot 1.12
Latest
Do I not get any additonal folders or files then?
The .jar is in the mods folder and I restarted the server and nothing happened. And I already have installed numerous plugins in
Papi only run on spigot atm.
What if Im using Spigot with pixelmon?
the server jar is minecraft.1.12 and reforged.jar
Ive seen other pixelmon servers use scoreboards so I figured there was earlier versions that would work since the most recent one doesnt
Link? :c
Idk, google
Google papi sponge v3?
This is a discussion topic for the Ore project, PlaceholderAPI. View the full project on Ore for downloads and more information. PlaceholderAPI If you were sent here from another plugin, simply download this plugin and install it in your mods folder. After the first start of...
Keep in mind that this isnt an official version and we cant support it
For any questions is better to contact the author
Im running Spigot tho
For mc version 1.12
And Reforged 7.2.0
Which is pixelmon
Idk then
Asuming that's a forge mod?
A member of staff has requested I move your message to a paste,
Most likely beacause it contains a config/error/code snippet.
Hello thank you for your answer I will try to be clearer ^^. What I put in bold is considered a string and not an int and if I remove the apostrophes it considers that it is a mistake
Ps: I use the ScoreboardObjectives expansion from PlaceHolderAPI and my two scoreboards are initialized to 1 for echange and 50 for calcul
the code is above the text
So placeholder to know if user is on X server?
1.13.2 placeholderapi not allowing to download off ecloud. (No cloud expansions are available at this time)
?ecloudblock
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.
no that's not it
can i use placeholder in amount of a requirement ?
it is difficult to explain ^^
use >= instead of has money
No
arf
But if you need a certain amount you can use the checkitem expansion which allows you to use placeholders inside
Ok thanks
could someone write a js for me using %uskyblock_island_level% but make it so it doesnt return level.0-9 (level is just numbers)
parseInt("%uskyblock_island_level%").toFixed(0);
parseInt is a method in Java you can use java in deluxemenu ?
function fixed() {
if (args.length == 0) {
return "";
}
return parseInt(args[0]).toFixed(0);
}
fixed();``` @uncut pilot
`%javascript_fixed_{placeholder}%`
parseInt is a javascript method
too for java ^^
Integer.parseInt()
it's cool that you can use javascript for deluxemenu
which is correct %javascript_fixed_{uskyblock_island_leve}% or %javascript_fixed_uskyblock_island_leve%
or do i have to add/change anything in the js?
{}
it just returns %javascript_fixed_{uskyblock_island_leve}%
Make sure u registered it
register it how?
doing /papijs reload returns an unknown command even tho i have the javascript placeholder
running 1.13.2 btw
/papi reload
We know about that
and running the /papi parse me %javascript_fixed_{uskyblock_island_leve}% doesnt work
just returns %javascript_fixed_{uskyblock_island_leve}%
is that the name of the file? "Fixed"?
The file name is used for the placeholder name
so the filename should be?
So the placeholder to know where a player is (which server on bungee), I though %player_server% did it but it simply replies itโs not in the server extension but I canโt find something doing the same in the server expansion
I read something on GitHub about the placeholder being %server_name%, is this correct?
I read something on GitHub about the placeholder being %server_name%, is this correct?
@tardy fox that's just saying the name lf the server in your PAPI config (or server.properties I don't remember)
there's no placeholders to get the server name of another player
The thing is I want my placeholder to show ยซ Hub1ย ยป or ยซย Hub2ย ยป since I want my hubs to run the same config for deluxemenu and make the menu detect via placeholder the server itโs on
ah, then use %server_name%
and add a requirement to check if the server name is Hub1 for example, and if yes it will do/show what you want
Iโm seeing tonight from where it gets the server name
Well it seems it pulls it from the PAPI config which is not perfect for me
you can change it easily
Since I want to make both Hub1 and Hub2 share the Plugins folder
Thatโs why I want to go conditional in my deluxe menu
Because I was simply putting text ยซย you are on this serverย ยป depending on the DeluxeMenu config per server
Hello, why doesn't work /papi ecloud download Jobs? I have latest PAPI and Jobs Reborn
Its built into the plugin now. https://helpch.at/placeholders#jobs-reborn
Thanks! ๐
@potent eagle
Please respect the rules, be patient and don't ping staff members!
?help
ยป Give the helpers some details
ยป Ask suitable questions
ยป Be polite
ยป Wait
?help
ยป Give the helpers some details
ยป Ask suitable questions
ยป Be polite
ยป Wait
Clip please help me with placeholder api
When I used %bungee_<server>%, it works on two servers, but not on the third.
It writes 0 players online, but one player on the server is, placeholder is 100% well entered
Please help me :/
@here
.
@potent eagle Is that third server listed in your bungee config?
Did you remove the <> and wrote the server name correctly?
There's an update interval, it could be the issue.
Yes, i have listed it in config and i removed <>
something went wrong for me when i press /papi parse me %checkitem_mat:stonebrick% it's return no but my stone brick it's in my inventory when in my hand it's return no too (version 1.8.8)
but /papi parse me %checkitem_mat:98% it's yes
Simular issue, Iโve tried to parse if a kit is available and it says yes, then Iโve tried to parse time remaining after claiming at it sticks at 0
Using essentials
UT Kit delay is 7 days (in seconds), %essentials_kit_time_until_available_UT% is the placeholder which is outputting 0 and %essentials_kit_is_available_UT% is the placeholder outputting yes
Trying to use it in a rewards system via deluxe menus, I previously used a JavaScript cool down for when you could claim it but players were able to bypass it so I switched the system to give the items via kits
Any configs can be supplied
guys spongeforge cannot use %player_ping__<playername>%?
something went wrong for me when i press /papi parse me %checkitem_mat:stonebrick% it's return no but my stone brick it's in my inventory when in my hand it's return no too (version 1.8.8)
@modest spindle
it's smooth_brick
guys spongeforge cannot use %player_ping__<playername>%?
@sleek pewter the SpongeForge version isn't related to the Spigot one
oh
Simular issue, Iโve tried to parse if a kit is available and it says yes, then Iโve tried to parse time remaining after claiming at it sticks at 0
@tender ledge you probably have the * permission or essentials.* who let's yiu bypass the kits cooldowns
using fabledskyblock and im trying to make a javascript to change "true" to "Yes" can someone help with a js
function IslandExists() {
return "%fabledskyblock_island_exists%" == "true" ? "Yes" : "No";
}
IslandExists();```returns only No
/papi parse me %fabledskyblock_island_exists%
it returns true
Double check both outputs
true returns &atrue and false returns &cfalse
var placeholder = "%fabledskyblock_island_exists%";
function hasIsland()
{
return placeholder == "&atrue" ? "Yes" : "No"
}
hasIsland();
Thank you โค๏ธ
Try that otherwise youre gonna have to strip the color
i wouldnt know how to strip the colour, but that works
Nice
https://cdn.discordapp.com/attachments/569963983902081118/686933701170429996/unknown.png
I want players to be able to click the item when they have over X score (using vault_eco to make it a bit more simple), but every time I reload, it gives out an error
what am I doing wrong?
when I remove the %% around the palceholder, the menu will load it, but will spit out this error: https://cdn.discordapp.com/attachments/569963983902081118/686934255007563806/unknown.png
[Tue, 10. Mar 2020 14:51:00 CET ERROR] [DeluxeMenus] Error in requirement javascript syntax - vault_eco_balance >= 100
you forgot %%
I was about to convert it to a paste smh
A member of staff has requested I move your message to a paste,
Most likely beacause it contains a config/error/code snippet.
Ty
Second, and then put the entire thing in ""
Lemme know if all works well
Hello
i parsed placeholder %player_has_permission_askyblock.island.range.100% and it returned yes
but i didn't add that permission
I tried /pex user Dogbu remove askyblock.island.range.100 but it still return yes
How can i remove that permission ?
Fun fact is you have to rejoin the game to actually take effect
i have tried to rejoin
ah okay
i have fixed it
I added permission askyblock.island.*
what are the placeholders for Voteparty?
#spigot-linking
I figure u can tidy up the command stuff
why not "papijs"
Idk
or even "papi js"
Change it if u want
Papi needs the ability for an expansion to register a command though
or a papi subcommand
Ya that would work too
or maybe /jsexp ?
that's ugly
It wouldnโt be hard to implement a handler for custom sub commands of daddy
dont ever mention that lmfao
lel
I think thatโs a better approach
That way all expansion commands are sub commands of papi
๐
So I can handle access through that
make a method that will be called when /papi is run to check the commands
Nah itโll be easy
void onHelp(CommandSender sender) {
if (sender.hasPermission("placeholderapi.admin") {
sender.sendMessage("/papi js git download [name] - Download a script");
}
}```
@final shadow
that's what I meant
Hello, I have custom menu for Jobs and when I am in the job, so it writes "click to join", where is a problem?
https://pastebin.com/FgUL1dtD
already_working:
type: string equals
input: '%jobsr_user_isin_Dลevorubec%'
output: true
Is it okay or not?
set true in ""
Still don't work :/
parse it in chat
And how I can fix it?
then type True
or usestring equals ignorecase
@tender ledge you probably have the * permission or essentials.* who let's yiu bypass the kits cooldowns
@junior musk
I just saw this, my other players without the bypass permission also see 0 as the cool down
https://pastebin.com/jvpVJCU8 <--- This is one of my deluxemenus entries
Daily:
delay: 86400
items:
- /vouchers give {player} Daily 1
And that's the essentials kit entry it relates to
Anyone who can shed some light on this for me I'll love you forever, papi parses the time as 0 to all players regardless of permission so its unusable.
%essentials_kit_is_available_Daily% so this says that it is available even if they don't have acces to that kit?
if that is the problem than you can add another requirement to check if they have acces to it
type: has permission
permission: 'permission.here'
Nope
Nope?
Yep
Blitz, that's just the daily kit.
I'll grab one for an actual member reward now, they have a permission check
What? ๐
That's the deluxemenu entry for the 'champion' rank in game
Champions can see it, but they're given the second option with a cooldown of 0.
They have the needed permission for both the kit and required permission for DM
Its really confusing me ngl
I'd be happy to send you all the involved configs, allow you on the server with permissions to check my permission groups and try it for yourself.
I don't see why it doesn't work
I wonโt be around a computer for an I it 14 hrs
But Iโd be willing to help when I do
Sure, thanks man... It's 10:38pm for me so that's around midday tomorrow, I should be online and ready. If you don't mind could you drop me a DM whenever?
I find I often get lost in support chats
Ayee, alright thanks man, I hate doing it without permission makes me feel naggy
@final shadow can I pr papi js?
ok
I want to try to give access to more bukkit stuff
Like ChatColor
@final shadow npe https://paste.helpch.at/jifuxafuco.pl
because you assign a value to githubScripts only if the github_script_downloads option is enabled
OMG
What
am I doing smth wrong? Caused by: <eval>:1 TypeError: PlaceholderAPI.setBracketPlaceholders is not a function
engine.put("PlaceholderAPI", PlaceholderAPI.class);
ah I think I need an instance of papi
@vivid sparrow hella smexy shit
ikr
Update, PlaceholderAPI.static.method() works @final shadow
Is there a placeholder to get the killer of a player after a death and the death reason?
pls make @unique arch if you know the answers
I just received this random error when reloading PAPI after updating an expansion (Vault)
> papi reload
[02:41:42 INFO]: PlaceholderAPI configuration reloaded!
[02:41:42 INFO]: [PlaceholderAPI] Successfully registered expansion: server
[02:41:42 INFO]: [PlaceholderAPI] Successfully registered expansion: statistic
[02:41:42 INFO]: [PlaceholderAPI] Successfully registered expansion: vault
[02:41:42 INFO]: [PlaceholderAPI] Successfully registered expansion: math
[02:41:42 INFO]: [PlaceholderAPI] Successfully registered expansion: player
[02:41:42 INFO]: 8 placeholder hooks successfully registered!
[02:41:43 WARN]: [PlaceholderAPI] Plugin PlaceholderAPI v2.10.4 generated an exception while executing task 842
java.lang.NullPointerException: null
at org.bukkit.craftbukkit.v1_15_R1.CraftServer.getOfflinePlayers(CraftServer.java:1587) ~[patched_1.15.2.jar:git-Paper-120]
at org.bukkit.Bukkit.getOfflinePlayers(Bukkit.java:946) ~[patched_1.15.2.jar:git-Paper-120]
at com.extendedclip.papi.expansion.vault.BalTopTask.run(BalTopTask.java:44) ~[?:?]
at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftTask.run(CraftTask.java:84) ~[patched_1.15.2.jar:git-Paper-120]
at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) ~[patched_1.15.2.jar:git-Paper-120]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.15.2.jar:git-Paper-120]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
It now constantly sends it every 5+ seconds
The error is gone once I downgrade the Vault expansion
Guessing @final shadow broke it
I quickly file an issue on the repo
Would there be a specific place where I could make suggestions for the E-cloud? Or would that be more v3 stuff?
Throw it in the v3 issues
Is there a placeholder to get the killer of a player after a death and the death reason?
pls make @unique arch if you know the answers
Weird @arctic loom is that a server you have never been on
The npe is coming from Bukkit.getOfflinePlayers
Nope
Weird
Guess thats from paper or something??
this shouldn't be null in spigot
@NotNull
public static OfflinePlayer[] getOfflinePlayers() {
and that part is the same in the old version too
oh
might be cuz its running async @final shadow ?
Is there a placeholder to get the server motd from server.properties?
No bot, itโs not there
Server name, it takes it from the papi config tho
Thatโs why it doesnโt work for me
%pinger_motd_<server/ip>:<port>%
Not goot for me also
Motd or server name ?
Server name from bungeecord or motd from server.properties
Not from a plugin config
Or saying an ip:port
I don't think you can for the server name from Bungee but you can with the motd form server.properties with the placeholder I sent above
%pinger_motd_<server/ip>:<port>%
Yeah but that still doesnโt work out for me
and did you set the right ip and right port ?
No, it doesnโt work for what I want to use it for
and what do you want to use it for ?
I would use the motd in server.properties for server identification since they are useless in bungee
then use what I sent
then set the ip and port of this server
From pulling directly from the server.properties I would put hub1 in motd, then hub1 would know itโs hub1
But if another server I donโt want the server to get ยซย hub1ย ยป
- set motd of the server to whatever you want
%pinger_motd_<server ip of the server you want with motd>:<port of that same server>%
I want it to output hub1 only if the server using the placeholder is hub1
If hub2 uses the same placeholder it would pull it from his config
And say hub2 in this cade
I want to use that for deluxemenu to change depending on the current server
Not motd of a predefined server, current server
ooooooh you're the same guy that asked last time for DM with the plugins folder shared between servers
Yeesss
yeah idk if that's still possible
Maybe with a spigot/bungee plugin
Papi doesn't work for bungee, so your best bet is to use the server name set in the papi config (which is seperate in each server) and then use view requirement to change it, but since neither papi and dm are bungee you can just have static values since the user viewing the menu will always be on the server you statically set the value for
ie.
If a user is in Hub1 the menu would always show Hub1 so you can just make it static
@brisk coral i plan on sharing the plugins folder between hub1 and hub2
So config per server is the problem
Are the hubs their own server instance
Yeah but theyโll use symlinks to the hub1 plugins folder
so hub2, hub3, hubX will pull plugins folder from hub1
:whytho:
I mean ctrl + c, ctrl + v
Change config on hub1, restart the others
You can still change it and then copy with 1 click to the rest
Update plugin on one, restart all
Thatโs why
And saves space
I even though of simply sharing the whole server folder and just set hub2, hub3, hubX in read-only
Since they all use the same map and all
Adding real bungee support would be nice though
Like the one PlaceholderHook had https://www.spigotmc.org/wiki/mvdw-placeholders/#bungeecord
@arctic loom paper said update your outdated server and its probably an issue with the environment your server is running idk
cant replicate locally
anyone here use placerholderapi in a bungee plugin?
i made a fork of the free mod blocker plugin for bungee but ive never messed with placeholderapi
im not seeing the info on wiki
Do someone know xp level placeholder? Only from PAPI
Hello, I was looking how to use advancement placeholders, I tried the default syntaxe from the wiki but it just wrote me "NO_WORKING" and threw a tons of errors on console
I tried %Advancements_<advancement>%
It throw NPE
Could someone explain me how it work ? Thank ๐
%player_exp% and %player_total_exp% don't work for me, it return 0
u installed player libs ?
I using a player placeholders
We moving to another plugins from mvdw and in our menu we using mvdw placeholder for xp levels %mvdw_xp_level%
for mvdwplaceholderapi you need 1 plugin from mvdw
I have it already....
u did /papi reload ?
Yeah
try to replace by that %player_uuid%
only xp don't work
oh
all player placeholders are working
maybe u don't have xp lvl... ?
oh, outdated player placeholders?
there are these 2 placeholders lol
i am blind
nvm
thanks man
show me that error
[01:22:34 WARN]: java.lang.NullPointerException
[01:22:34 WARN]: java.lang.NullPointerException
[01:22:34 WARN]: java.lang.NullPointerException
[01:22:34 WARN]: java.lang.NullPointerException```
it just spam an NPE
but when you parse advancement placeholder
line-8:
text:
- '&8&lProgrรจs: &d%Advancements_player_<player>;<advancement>%'
random: false
interval: 2
score: 0```
first when you want add some placeholders do /papi parse me %placeholder% to test
first test, then implement into configs ๐
it throw me NO_WORKING
So, do you have enabled advancements in spigot.yml?
let me check
advancements:
disable-saving: false
disabled:
- minecraft:story/disabled``` well Idk
and player data?
where I found it
what's the yml key ?
I got this:
advancements:
disable-saving: true
disabled:
- '*'
stats:
disable-saving: true
forced-stats: {}
and placeholder work ?
send me what you tried
line-8:
text:
- '&8&lProgrรจs: &d%Advancements_player_<player>;<advancement>%'
random: false
interval: 2
score: 0```
example of advancement?
what do u mean
I want to try it: /papi parse me %advancements_player_ArcadeFighterX;
but i don't know any advancement
me too lol
i need <advancement>
yeah
well the problem came from here
then the real problem is "how I can make a achieved advancements like 4/51"
try this: /papi parse me %Advancements_story/root%
returned true
try this now: /papi parse me %Advancements_story/mine_stone%
got true again
so it works, but there is no like completed advancements
nothing it return the syntaxt..
tried with <> and without
u just gaved me the wrong syntaxe
/papi parse me %Advancements_playerList_Corazun% it work
<-- dumb
i'm dumb bruh I didn't knew I had to remove <>
xd
so the next question is, could I got the true achivement as a number ?
please don't tell me I have to use js
If advancement return true/false you don't have to choose, but i can solve your problem with js
is there a way to center text using PAPI?
Placeholder api is just an api to manage placeholders. It's up to the individual plugins to centre text
centering text is dumb because texture packs can have different fonts with diff spacing
space in one texturepack is bigger/smaller than another
Could someone help me, I have problems with js papi integration. I try to compare a string from a collection to "true" to check if the player got the achievement
var achievements = [
"%Advancements_story/root%",
"%Advancements_story/mine_stone%",
...
"%Advancements_story/upgrade_tools%",
"%Advancements_story/smelt_iron%"
];
var achieved = 0;
function getAllAdvancements() {
for (var achievement in achievements) {
if (achievement == "true") achieved++;
}
return achieved;
}
getAllAdvancements();``` the condition isn't filled even if the player have the achievement also that kind of code work (I tested it) ```js
...
if ("%Advancements_story/root%" == "true") achieved++;
...```
and I don't want to make a switch bruh
[23:23:35 ERROR]: [PlaceholderAPI] Failed to init placeholder expansion from class: com.extendedclip.papi.expansion.factions.MCoreFactionsExpansion
[23:23:35 ERROR]: [PlaceholderAPI] com/massivecraft/factions/RelationParticipator
Getting that error for relational placeholders
Do someone know how %vault_prefix_color shows whole prefix? (Using LP)
@wheat delta maybe try to use the other for loop? for (var i = 0; i < achievements.length;i++)
ah
like achievement NEVER equal "true"
also if I try "%Achievement_story/mine_stone%" == "true" it work
So if you parse it in chat it doesnt return true?
if I parse an achievement it return true in chat
try equals()
achievement.equals("true") ?
I think the problem came cuz js is stupid with var type
Did that work ^ ?
=paste
Please use a paste service to share configs, errors, code and long logs.
โข HelpChat Paste
@final shadow ^
Fixed in latest dev build
Also, clip, how do you build on ci?
I donโt have the GitHub trigger enabled to build on push but just gotta run build on Jenkins
Ah
Do we not have a dev build out with the fix
I will send it in a sec
so I add papi expansion jar ?
ye, just replace yours
Gaby the latest build on Jenkins has the latest changes
I didnt push my changes 1d ago
well
I changed in my script i++ to i = i + 1
and it doesn't throw errors on reload...
strange
ok now that's weird no more errors even with i++...
not sure where to put this, but how do I report a broken/out of date expansion?
whats the issue?
on newer versions of McMMO, the (3rd party) expansion for it, the %skill_rank% returns internal error
do you have the latest expansion for McMMO?
i was gonna contact the author but it hasnt been updated in 3 years
yeah, 2.0.0
my mistake, last updated may 2018
also what is the error in console?
one sec
Please use a paste service to share configs, errors, code and long logs.
โข HelpChat Paste
does papi parse not work in the console?
i don't think it does
it does. u have to use an actual player name instead of 'me'
oh right ๐ didn't think about that
I just did /papi parse ChewLeKitten %mcmmo_rank_fishing% with no output in the console but an error ingame
looks like there's a new rank system
as of jan 26, 2019 anyway
alright i found a more up-to-date and working placeholder but it's not on the cloud, ah well
so I have a test server for 1.12.2
I have the latest PlaceholderAPI
and when I do /papi ecloud download Vault
and /papi reload
it doesn't download the extension
i don't get any errors btw
[21:38:29 INFO]: [PlaceholderAPI] Fetching available expansion information...
[21:38:29 INFO]: [PlaceholderAPI] Download of expansion: Vault complete!
[21:38:30 INFO]: BlitzGamer_88 issued server command: /papi reload
[21:38:30 INFO]: [PlaceholderAPI] Successfully registered expansion: essentials
[21:38:31 INFO]: [PlaceholderAPI] 168 placeholder expansions are available on the cloud.
Is vault installed? @turbid tide
yeah it wasn't ๐ I figured it out
forgot I was on a test server
and not all plugins are installed
Hello guys, how can i make to players see what version he/she use? sry my bad english ๐ฆ
thanks, but i like to use ProtocolSupport
ยฏ\_(ใ)_/ยฏ
go yell at the dev to add a placeholder for that
or whats the better? i can try it
I prefer ViaVersion personnally
Okey, i will try it
you need ViaBackwards for that
and if you want 1.8 and 1.7 then with ViaVersion, you'll need ViaBackwards and ViaRewind
oh that is the name
Okey guys, thank you ๐
Someone gimme a hand, clip didnโt understand what the problem was and Iโm waiting for him to get back to me but if we got any smart asses here someone might spot something
what's the problem ?
https://pastebin.com/LL0j3J2P
This is the entire deluxemenus rewards menu
https://pastebin.com/7uG2NPGp
This is the essentials kits.yml
Iโve checked perms
They should be offered the first option if a kit is available in dm, instead theyโre given option two, when parsing the cool down for any rank I get given 0, and all players see 0 as the cool down
can you remove the code text ? it's really annoying on phone to copy paste the links x)
thx
Youโre welcome
first I can see that there's a space missing before - 0
EDIT: nvm, it's probably my phone removing a space or Pastebin having the same problems as SpugotMC
for the first item slots
Kit names should be wrote with lower case in placeholders
Iโll check that now, I think thatโs just in paste because itโs not there in my text editor or online ftp... Gaby, even if the kit name is caps?
Yes
sorry, I wanted to help but I had other discord servers to help, I'm switchong from one server to another, so it's kinda complicated ๐
Iโll try to fix my dm now and let you know if it helps
@turbid tide #ecloud-updates ๐
๐ฎ
Thanks a lot
#spigot-linking
Need help
When i do /papi ecloud download essentials
and then papi reload
it doesnt get added
to the papi list
cant see it there
it says it was downloaded
and have the latest version also
any errors?
thats all there is in the error?
ye
@warm topaz now i'm verified
and u have the latest essentials?
@vivid sparrow I tried to make kit names lowercase in placeholders but it didnโt change anything
@tender ledge
Please respect the rules, be patient and don't ping staff members!
Oh, shit sorry Barry
Yeah same error as before though still shows a 0 cool down
Anyone a smorty?
Open requirements
@royal parcel You could just deny the permission in LP for deluxemenus for that world lp user|group <name> permission set <permission> false world=<world name>
lp group member permission set deluxemenus.open.gui_ce false world=world_num_1 ? ~~
i can't find deluxemenus permission
Omega, /dm open <menu> requires a permission, whereas the regular menu command does therefor it'd be easier and more organised to make a requirement which checks the users world
yeah
and maybe if you want it in multiple worlds make a js expansion so there are not a lot of view requiremenents
Is it possible to use another placeholder if the current placeholder isn't "active"?
For example i use %tab_tabsuffix% but when that is "null" i want a text to be displayed, if you you understand
javascript
you need to make your own placeholder using javascript
okay
Is this the right thing? https://www.spigotmc.org/resources/placeholderapi.6245/update?update=36240
And if it is how do i enable it in the config? I can't find "javascriptplaceholders" in the config
that's an update from 2015
the js expansion still exists but the format have been changed
@onyx mauve if you use /papi ecloud download javascript
u can then download an example script from within the expansion
I did that
run /jsexpansion git list
wym i thought it was
actually I will do it, I forgot to change the version
do u have an account on my jenkins
Do i need to set "github_script_downloads: false" to true?
no clip
yes
It says that it is disabled in the config
set to true and do papi reload
okay
gaby
can u add a command to the expansion to enable / disable by command
or should i if u arent up for it
use this expansion @onyx mauve https://cdn.discordapp.com/attachments/573429521554866178/687542991740862474/PAPI-Expansion-Javascript.jar
so i should not use the JavaScript
if we edit the config through code the comments will be removed @final shadow
it's the same thing but that has a bug fixed
okay
we will post it on the ecloud a bit later
