#placeholder-api
1 messages · Page 142 of 1
placeholderapi config
enabled: true
im not seeing any placeholders for even seeing if a player is whitelisted, let alone in an another server, so doesnt look like it
u can check the full list here - https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Placeholders
My bad, everything works)
👍
but what about play time?
u would probably need a more advanced solution for that, such as the LeaderHeads plugin
in essentials u can find with /whois how much he played
yeah but if you want a leaderboard you need LeaderHeads
Essentials doesn't have a leaderboard for playtime
you can remove everything after point but that's all
don't think there is way to limit decimals
math?
hahah, how i can remove then
well I guess js.
but not directly from the top placeholders
%vault_eco_top_balance_fixed_#%
kek
ty
Hello, I have a problem. I would like to set the number of players on the server on scoreboard, I put placeholder %server_online% but it doesn't work.
I have a PlaceholderAPI plugin for this. Please help!
if u do /papi parse me %server_online% what does it return?
@eternal wedge
/papi ecloud download server
/papi reload
Thank you for help i go sleep but i try it after 😀
[PlaceholderAPI] expansion class SemperChatExpansion is outdated:
Failed to load due to a [NoClassDefFoundError], attempted to use ru/SemperAnte/Chat/SemperChatPlaceholders
Why can this happen?
Where did that expansion come from exactly?
Could anyone give me a hand with a script. Please message me
just do it here ;-;
So I'm trying to write a script that changes the ftop value in chat from n/a to nothing. ( When a faction doesn't have any value it shows the faction ftop as n/a in chat and on featherboard) basically I don't know where or how to start
This is mine, it already works fine on my one server 1.8.8, but when I try to run it now on another server, I get an error
Send the jar to me ;-;
%skript_ftopf::ftopaddon_faction_rank%
%skript_ftopf::player%
on placeholder request with prefix "ftopaddon_faction_rank":
if the identifier is "n/a":
if the player prefix is "n/a"
set the result to " "
else:
set the result to "%ftopaddon_faction_rank%"
``` I know its wrong but could i get a hand on how to do it
a couple of minutes, I guess what the problem is
@Override
public boolean canRegister(){
return (semperchat = (SemperChatPlaceholders) Bukkit.getPluginManager().getPlugin(getRequiredPlugin())) != null;
}
I don’t know why it didn’t work, I deleted it and it worked, maybe it was due to some kind of logic change in Paper 1.12.2
Since I don't need this check, everything is fine)
hm
no, it didn't work xD
@wise goblet sent to private messages jars
@Override
public boolean canRegister(){
return true;
}
tried it this way
but got an error in the console
https://pastebin.com/CWG9jfyd
I will check on that later... Since I am not on my pc rn
😖
@wise goblet Sorry, I already understood what the problem is .. After a bunch of hours it came to light that in the plugin API I turned off the plugin in the config
These might do the trick
The firstInit() function will always triggered once when you first evaluating the script
And the JSON getter
I think more people in here would be able to help if you used PlaceholderAPI Javascript placeholders instead of Skript
im new to coding so please explain how to
This should have some basic info
okay i read all that and understand var and functions now.
Do i something wrong or is it the gradient some not work https://paste.helpch.at/ohatibafel.apache
I'm not familiar with that expansion, but I think it's because somewhere in the argument that you're supposed to use a number
It say "%gradient_message_{#hex1}_{#hex2}_message with colors% * Returns the supplied message with each letter colorized by the gradient" , do you think on %gradient_percent_{#hex1}_{#hex2}_{percentage:0..100}% * Returns a hex value by percentage between two colors ?
Edit discord change my paste.
I´m not expert on the code, but when i look in it, it seams it miss some of parts of code (not 100 complete), so probably abandoned project.
@turbid tide in case you're into this: #placeholder-api message
@rare lily,
Please respect the rules, be patient and don't ping staff members!
o
I have a Question when i try like /papi ecloud download Essentials it dosn Work
did you do /papi reload after?
Then it say No expansions found
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.
my mc server is on 1.16.4
^
Ty
Hello, so I have this plugin called Items Adder which allows you to use custom images in text, gui, signs, ... There is an integration for it to work with Placeholder API. I only recently discovered this but default players see %img_imagenamehere% instead of say the image of a heart emoji.
I can see all the placeholders with no issue. So this must be a permissions thing. Players also have custom image prefix so it's an actual image of PLAYER playername >> Hey guys This seems to work fine but when it comes to placeholders, they can't see them.
Using an image in chat is different than using it in a hologram, you'd use : heart : (no spaces) and it will show the image. But holograms like NPC's names require placeholder
I'm pretty sure there is permissions you can give from ItemsAdder.
to allow placeholders use
%redprotect_player_total_blocks%, its require no download https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Placeholders#redprotect
[16:34:56 INFO]: RedProtect version 7.7.2
[16:34:56 INFO]: Allows players to define fields to protect their houses.
[16:34:56 INFO]: Author: FabioZumbi12```
yes. there is no expansion download required. it comes directly with the plugin.
but it doesnt work
papi parse fuki21 %redprotect_player_used_blocks%
[16:36:24 INFO]: %redprotect_player_used_blocks%```
is this the correct page for report this kind of bug ?
Well see another weird thing is that yes, there is a permission for that it's ia.user.image.use.imagename so for example ia.user.image.use.heart DOES WORK, while ia.user.image.use.player DOESN'T
I'm using an addon called Betterranks. The default emoji's that come with the plugin work but the ones i added don't, at least not in placeholders
and you're sure you've used it correctly? also you can set up permissions for each yourself
did you set them?
and you got the plugin installed 100% ?
The betterranks config file allows you to set a permission so it would be betterranks.player Doesn't work when added
hmm I'm not really that experienced with IA. Used it a bit but not a lot. They do have a discord server tho where you can ask for help. because I'm not fully aware of how their stuff works.
I see
I was looking right at it hehe
I've tried everything
you could join to see if you spot anything
ain't got that much time rn.
all good
that's why I suggested going to their discord because I know IA is not that popular in here and I ain't got time to look into this anymore xD
[16:34:56 INFO]: RedProtect version 7.7.2
[16:34:56 INFO]: Allows players to define fields to protect their houses.
[16:34:56 INFO]: Author: FabioZumbi12``` yea ofc, and this what i got from /about redprotect
@zenith bane,
Please respect the rules, be patient and don't ping staff members!
can you send a startup log?
?Startuplog
Startup Log Location
Your latest startup log can be found in the logs folder of your
server directory, labeled as latest.log.
Please copy the contents and paste them to a paste service.
Type ?paste for more information.
this is how you get the startup log ^
i cant send a file in here
Paste Services
When asking for help with a config/menu/code issue please use one of these:
(However we do prefer if you used our paste :))
• HelpChat Paste - Usage
• Hastebin
like these ones ^
[RedProtect] PlaceHolderAPI found. Hooked and registered some chat placeholders. as you can see it hooked. so I guess you'll have to contact their support because its most likely a problem on their part. I can't see any other errors
Anyone help me with this js? So I basically wanna make like money needed to rank up and it'll display how much you need to well, obviously rankup. So it'll minus your money from the price needed to rankup. But if they have the amount or more then it'll say /rankup
It'd obv need to be erm, js
function rankup() {
if (args.length == 0) {
return ""
}
let cost = parseInt(args[0]) || -1
if (cost <= 0) {
return "cost is <= than 0"
}
let balance = parseInt("%vault_eco_fixed%")
if (balance >= cost) {
return "You can rankup!"
}
return balance - cost
}
rankup()```
Try this @tranquil sapphire `%javascript_identifier_200%`
Hold on. To double check. I put this in the js folder right
under wotever name and then use the placeholder to identify it?
using this placeholder? %javascript_identifier_200%
identifier is whatever name you gave it on javascripts config
Like
oh @vivid sparrow let is not a thing in nashorn
that's the problem
1 sec let me fix
So it'd give you an exact amount that you need to rankup
function rankup() {
if (args.length == 0) {
return ""
}
var cost = parseInt(args[0]) || -1
if (cost <= 0) {
return "cost is <= than 0"
}
var balance = parseInt("%vault_eco_fixed%")
if (balance >= cost) {
return "You can rankup!"
}
return balance - cost
}
rankup()```
this is it
he used let instead of var
so basically you'll use it like this %javascript_identifier_{cost_placeholder}%
I wanna use %ezrankspro_cost% and the players balance to get the exact amount they need to rankup
ugh that's what the javascript does for you
just do %javascript_identifier_{ezrankspro_cost}%
function rankup() {
var cost = parseInt("%ezrankspro_cost%")
if (cost <= 0) {
return "cost is <= than 0"
}
var balance = parseInt("%vault_eco_fixed%")
if (balance >= cost) {
return "You can rankup!"
}
return cost - balance
}
rankup()```
there
and it will cacluate automatically
Anyone know why this placeholder does not work? The output is nothing...
%parseother_{iridiumskyblock_island_top_owner_1}_{iridiumskyblock_island_members}%The placeholder %iridiumskyblock_island_top_owner_1% does give a playername in its output 🙂
it should work, just tested it
you're using the latest that gaby gave?
show the placeholder that you're using
yeah and %javascript_identifier_rankup%
ugh...
{placeholder.here}
rankup is not a placeholder
from PAPI
%javascript_identifier_{ezrankspro_cost}% I think this should work
arguments arent needed
is just %javascript_scriptNameHere%
Ok ill give it a whirl
oh also @vivid sparrow the vault placeholder
seemed of but had to check
it also has the balance word in it
true
function rankup() {
var cost = parseInt("%ezrankspro_cost%")
if (cost <= 0) {
return "cost is <= than 0"
}
var balance = parseInt("%vault_eco_balance_fixed%")
if (balance >= cost) {
return "You can rankup!"
}
return cost - balance
}
rankup()``` @tranquil sapphire
https://prnt.sc/wjw324 still the same with the new code and with the placeholder %javascript_rankup%
what if you do /papi parse me %javascript_rankup% ?
ok now /papi parse me %ezrankspro_cost%
0
I am opped
/papi parse me %ezrankspro_cost% works on an alt
Gives the correct amount
ok and if you parse the javascript on the alt. does it return anything?
nope
ok send a screenshot of how your javascript_placeholders.yml looks
and then a screenshot of how your rankup.js file looks
javascript_placeholders.yml ???
oh
The file isn't there..
isnt so simple like
rankup:
file: rankup.js
engine: nashorn
javascript_placeholders: https://paste.helpch.at/ivosuqirug.shell
rankup.js: https://paste.helpch.at/ulibehalay.js
where is that rankup.js located in?
hmm I'm confused because it seems to work for me. of course I don't use the cost placeholder just a random number
I only have 2 tasks on the to-do list of JS-Exp
o
Which is editing wiki and find a way to support all users
and it all works? I mean what you've added so far
support all users?
what does that mean?
Erm... don't mention that 
But the functionality, it's all gucci
I finished the debug
How to remove the How to remove the decimal in
papi ecloud download math?
like 1.000 -> 1
i think i know the issue, when i /papi reload papi didnt hooked to the redprotect plugin but when i do /rp reload again it worked
@zenith bane,
Please respect the rules, be patient and don't ping staff members!
Hey, how do I retrieve values from a sql database and parse it into a placeholder?
I forgot the term for this, but is it possible to do this with parsing placeholders inside eachother?:%placeholder_{placeholder2_{placeholder3}}%
99.999999999999999999999999999% sure it's only possible with a specific expansion
it works if the expansion supports parsing placeholders within its own placeholders, yeah
for example, the %math_...% placeholder support placeholders with {} but %bungee_% doesn't
Sombody knows which expansion this is %javascript_rewards-delay_OpenDelay_5% . Please tag me <
uh
Yes but they are not working anymore for me
@rustic wharf,
Please respect the rules, be patient and don't ping staff members!
Bonjour,
What's the current latest version of Papi,
https://api.extendedclip.com/expansions/playtime/
says 2.20+ while I'm running 2.10.9
Last update was in 2017, is probably a typo
what placeholder can asynchronously get the prefix of an offline player?
swear?
js expansion is not yet compatible with java 15
%parseother_{nickname}_{vault_prefix}%
Caused by: java.lang.RuntimeException: The operation to load user data for '87803417-1311-3f9b-b275-27fdb1e63a42' was cancelled by LuckPerms. This is NOT a bug.
The lookup request was made on the main server thread. It is not safe to execute a request to
load data for offline players from the database in this context.
If you are a plugin author, please consider making your request asynchronously.
Alternatively, server admins can disable this catch by setting 'vault-unsafe-lookups' to true
in the LP config, but should consider the consequences (lag) before doing so.
@vocal folio a placeholder can't be 'asynchronous', the API doesn't work with any kind of callbacks or promises
What I mean by this is that it all depends on who's calling the placeholder
So if your plugin fetches it from PlaceholderAPI on an async thread, it will be async
'/papi parse' fetches it on an async or sync thread?
Hi. Is there even a way to push wiki changes to JS-Exp though?
function getRank() {
if RANK !== " "{
return RANK !== " " ? [${RANK}];
}
}
getRank()
``` could anyone help with this?
are you trying to return [rank] if they have a rank and an empty string if they don't ?
so when they dont have any ftop value to return an empty string, once they do have value for the [rank] to return at the start of the prefixes
var rank = "%ftopaddon_faction_rank%"
function getRank() {
rank != "" ? "[" + rank + "]" : ""
}
getRank()``` this should do it then
@balmy marten do you have access to give him access to the JS-Expansion wiki? he's the one working on it now and wants to update the wiki. thanks
Ok accepted
Updated the script, although ftop in chat still doesnt update with the brackets once it has a value, is there anything i need to change on DeluxeChat for it to register?
Also messed around with a value but still to no luck
can you do /papi parse me %ftopaddon_faction_rank%TEST when you have a rank and when you don't and send a screenshot of both outputs?
Sure just give me a sec to install a screenshot software.
^With
https://gyazo.com/f079a8fc2e95429273be73533583f65d
^Without
can you do without again but this time this: /papi parse me TEST%ftopaddon_faction_rank%TEST
ahh guess so
try this then js var rank = "%ftopaddon_faction_rank%" function getRank() { return rank == " " ? "" : "[" + rank + "]" } getRank()
also in my old script I forgot to add return xD
ahh lol, didnt even pick up on that lol
https://gyazo.com/801f3f23a9d0795f028286c53c35e5b4 <-- So the value shows, but no brackets around it
not sure, but i believe so, my mate set all that stuff up and jut asked me to do the code
looking at it, looks like he used the ftopaddon placeholder
anyone know of a way to print a number string of the number of players with x permission?
so close :(
would appreciate an @ if anyone figures this out <3
use this expansion ^
here's the full wiki: https://github.com/Tanguygab/PlaceholderAPI-PlayerList-Expansion/wiki
blitz had a look into the js placeholders for fac and stuff, and none of them seem to have a fac rank or anything
is there any way around this or alternatively we switch it up and not use factop instead some map points style thing
what is fac?
faction
so can anyone help with the %Server_countdown% placeholder? I'm trying to get a countdown to 05:00 each day, but parsing %server_countdown_HH:mm_05:00% seems to just return 0. Is there a way to do this? I can get a countdown to a date to work fine, just not a time
this is probably a common one, but I cant seem to find an explanation of how it works fully to identify what im doing wrong
So I've had a good search, and all I can find is this https://github.com/PlaceholderAPI/Server-Expansion/issues/5 which states that a feature to do this was added in 2.2.2, except there isnt any documentation explaining how this new feature works, as far as I can tell
Can I get any help with this?
You can always request a custom plugin 
well, apparently this is a feature in the Server expansion
but there isnt an explanation of how to use it
ohh okay
I'm confused on what you're asking ;-;
wait
countdown for local time?
👀
effectively
but the only feature ive found that does this
is the one added in 2.2.2
but neither the issue, nor the github seems to explain how to "use placeholders inside of the placeholder"
What placeholders did you try already?
so the notes state you can use %server_time%
2 secs, ill grab the thing im working with
%server_countdown_dd.MM.yyyy.HH:mm:ss_{%server_time_dd.MM.yyyy%}.05:00:00%
fucking formatting
%server_countdown_dd.MM.yyyy.HH:mm:ss_{%server_time_dd.MM.yyyy%}.05:00:00%
so, in theory, i should be able to somehow include the placeholder in {}
does it support putting placeholders in placeholders?
according to the release notes for 2.2.2 and the issue
oh i see what you mean
hmm
yeah
ive no idea
tried {} () .. _ _
tried just using %%
none of them seem to work
If you can't find anything in a few days I recommend requesting a custom plugin though
I would do it (for free) but I don't have time 😐
maybe later if you can't find a solution
thanks, hopefully someone will know how to use a feature included in the expansion
🙂
You need to add papi_server_time, etc.
Where are you displaying the info?
I'm not sure, sorry
Guys, am I using PlaceholderAPI correctly?
String huis = PlaceholderAPI.setPlaceholders(player, "§fБаланс§8:§e%JavaScript_money%§8§e%JavaScript_credits%");
Score money = obj.getScore(huis);```
?
%server_ram_free% doesn't seem to work. it looks like a countdown from 5.3k to 2.7k that restarts back to 5.3k
Ofc thats how garbage collectors work
Its being displayed in TAB atm - how do I actually insert the papi_server_time into the placeholder though?
is this responding to me? lol
Yep
then i'm confused on what you meant, @novel moss. i don't know what garbage collectors are XD
Anyone knows this error?
I can't seem to load mysql and player
only the Mysql folder gets generated
when i download it from /papi ecloud download
the factions MCore expansion isnt working... any ideas as to why?
Do you have MassiveCore and Faction on your plugin list?
@thick ginkgo Given up on FX
Spigot Account Linking
To get support for a premium plugin owned by Clip or Glare you will need to verify your spigot account using =spigot in the #bot-commands channel. After you have successfully linked your spigot account you should ask your question in the coresponding channel for that plugin. If you have already linked your account and want to update your roles, run this command =spigot check.
help with?
I'm using deluxechat but papi doesn't work. Can you help me?
https://iphoto.net/i/ekran-alintisi.SkXoK
may I ask when did you purchase deluxechat?
I dont remember
In fact, this is the case for almost all chatformat plugins, not just for deluxechat.
you bought the plugin over an hour ago? because if you did you were not found in the database
@west pond #spigot-linking please. thank you
will do gimme a sec
i have been trying many plugins and i used pirated plugin to try this @turbid tide z
i have the same problem with every plugin
Yikes
why do i have to verify if im asking for support with PAPI which is free?
but my problem is has nothing to do with it
the jar is owned by my friend and not me 🤔
the problem is not deluxechat the problem is papi does not work in any format plugin, but it works with plugins for other purposes
🔨 It has come to my attention that a user was using a leaked plugin, they have been... well let's say.. dealt with.
YML ```
factionChat:
file: factionChat.js
engine: nashorn
js:
```js
function chat() {
var faction = '%factionsuuid_faction_name%'
if (faction.length != 0)
return '%rel_factionsuuid_relation_color%%factionsuuid_player_role%%factionsuuid_faction_name% &8&l⎹';
else return ''
}
chat();```
https://solos.only-fans.club/g8XHOawb
var
1 sec
okay
what's your JavaScript Expansion version?
i just downloaded it so i believe its the latest
try this then js function chat() { var faction = '%factionsuuid_faction_name%' return faction == "" ? "" : "%rel_factionsuuid_relation_color%%factionsuuid_player_role%%factionsuuid_faction_name% &8&l⎹" } chat()
but that's literally the same? ill try it anyways
didnt workhttps://solos.only-fans.club/38QP7RZC
can it be that '%factionsuuid_faction_name%' returns a color code even if the player is not in a faction
its not, replaced the script with js function chat() { var faction = '%factionsuuid_faction_name%' return "Test" return faction == "" ? "" : "%rel_factionsuuid_relation_color%%factionsuuid_player_role%%factionsuuid_faction_name% &8&l⎹" } chat()
to test and it didn't return anything
I think that's not gonna work...
what won't work 🤔
function chat() {
var faction = '%factionsuuid_faction_name%'
return faction == "" ? "" : "%rel_factionsuuid_relation_color%%factionsuuid_player_role%%factionsuuid_faction_name% &8&l⎹"
}
chat()```
i mean the script itself isn't working
Any errors on console?
ooop shouldve prob checked that earlier
[14:47:00 INFO]: [PlaceholderAPI] Successfully registered expansion: luckperms
[14:47:00 INFO]: [PlaceholderAPI] Successfully registered expansion: vault
[14:47:00 ERROR]: [PlaceholderAPI] Failed to init placeholder expansion from class: com.extendedclip.papi.expansion.factions.MCoreFactionsExpansion
[14:47:00 ERROR]: [PlaceholderAPI] com/massivecraft/factions/RelationParticipator
[14:47:00 INFO]: [PlaceholderAPI] Successfully registered expansion: player
[14:47:00 WARN]: [PAPI] [Javascript-Expansion] File: example.js for Javascript placeholder: example is empty
[14:47:00 INFO]: [PAPI] [Javascript-Expansion] 0 script loaded!
[14:47:00 INFO]: [PlaceholderAPI] Successfully registered expansion: javascript
[14:47:01 INFO]: ***fdhfgh <Pedolo> asd
[14:47:02 INFO]: Pedolo issued server command: /papi parse me %javascript_factionchat% | %factionsuuid_faction_name%
[14:47:54 INFO]: Pedolo issued server command: /version PlaceholderAPI
wait i think im dumb
yea fixed it
thanks alot ❤️
I just updated Papi and it still crashes /papi ecloud list if I have my expansion installed, is it my expansion?
Still not sure if anyone's answered, but how are you supposed to use other placeholders inside the %server_countdown% from the Server expansion, as per 2.2.2?
what do you mean by that?
this? %server_countdown_<SimpleDateFormat>_<ActualDateAndTimeBasedOnSDFSpecified>%
Also, why are you on 2.2.2 when the latest is 2.4.0?
Good evening, I have a problem with the placeholders, when I install the placeholder Player, it works fine but all the others don't work ...
@storm sorrel if you have the latest Papi make sure your expansions are up to date
I have the last papi but precisely when I do / papi ecloud download Vault I have all the versions of Vault that appear except the one I use
Any other options other then pinger placerholder, as can't really use it on my network
yes
then just type /papi ecloud download vault
and press enter
you don't need a version, that's the EXPANSION version not the PLUGIN version
if you don't put a version it downloads the latest
I suggest downloading the latest for all expansions if you're on the latest version
I am using the latest version of my plugins but when I download an extension with the command, the expansion does not work (even in the download version), in fact it is as if there is no expansion in the file while they are there
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.
that should work
in fact it is as if there is no expansion in the file while they are there
are you saying there IS a file, but it's acting like there isn't?
What I meant is that the expansions get downloaded to the "expansions" folder but don't work, even when downloading them manually ^^ '
and you reloaded right?
make sure you don't have multi of the same expansion, just slightly different names
^ only have one of each
Yes, i reloaded but not work
/papi dump
what does /papi dump do?
Please use a paste service to share configs, errors, code and long logs.
• HelpChat Paste
did you just paste a paste link
try using the dev build of papi linked here https://ci.extendedclip.com/job/PlaceholderAPI/
it seems functional again, thanks to you!
👍
I'm running dev-122 and things seem to work but when I reload papi the e cloud list stop working
hmm, might be an issue for github?
everything works fine on fresh boot of server
only break ecloud list when I have the Statz expansion
release 2.2.2 added a feature where you can apparently pass the %server_time% placeholder into the countdown one, to create a local countdown to like 6AM each day, but I cant find exactly how you pass the server time to the countdown
@lean crystal,
Please respect the rules, be patient and don't ping staff members!
So in theory, I would set the countdown datetime format to dd.MM.yyyy.HH:mm:ss then pass it %server_time_dd.MM.yyyy%.06:00:00%
damn, its curly braces without percentages
yep
ye most placeholders in placeholders work like that
since PAPI offers a method for it so its easy to implement
I thought it was something like that, but was just missing the part where % isnt needed
thanks
a ton
thought I was going mad
👍
Okay, so that is now parsing, which is a big step, but its being parsed as 0
%server_countdown_dd.MM.yyyy.HH:mm:ss_{server_time_dd.MM.yyyy}.05:00:00%
what's the time for you rn?
when the server date time is 11/01/2021 18:25:30
this doesn't calcualte for the next day
2 hours of sleep
how can I point it do the next day on from current date?
if that is possible
hmm that's a good question.
I would recommend you make a javascript for that because I don't think you can do placeholder in placeholder in placeholder
hmmm, okay
this is where you learn how to create one: https://github.com/PlaceholderAPI/Javascript-Expansion/wiki
ty
I'll make the placeholder for you
oh, thanks!
hmm now that I think about it its going to be a bit more complicated xD
its never straightforward
the problem is if I just add 1 to day it will just break when its last day I guess.
last day in month I mean
ahh right, for the months, yeah
wait I can just use day of the year instead
I'm going to pretend to understand what you mean and agree
ugh day of year so 1-365
riight
until then make a javascript file and all that stuff
shall do
Placeholder to use now: %server_countdown_DD.yyyy.HH:mm:ss_{javascript_time}.05:00:00%, Code to use: ```js
function time() {
var day = parseInt("%server_time_DD%")+1
var year = "%server_time_yyyy%"
if (day+1 > 365) day = 1
return day + "." + year
}
time()
you're a lifesaver, shall try it now
btw change {javascript_time} to your {javascript_identifier} so basically whatever you named the javascript, change time to that
can you parse just the javascript? /papi parse me %javascript_identifier%
i think there's a % missing
yep
Okay
parses correctly, gives 12.2021
okay
that whole placeholder parses fine
but shows as "invalid date" in TAB
looks like a TAB problem then
tyvm though
ugh don't think its a TAB problem
oh?
do /papi parse me %server_countdown_DD.yyyy.HH:mm:ss_{javascript_time}.05:00:00%,
well, where the placeholder is in the TAB config, it just says "invalid date"
but when parsing with /papi parse, the countdown works fine
so thats what shows on TAB
'&5Server restarts in &f%server_countdown_DD.yyyy.HH:mm:ss_{javascript_time}.05:00:00%' line in the config
ye no idea then.
I cant see anything wrong with the placeholder
if it parses fine in /papi parse
yeah, ill take it up with the TAB lads
I don't know why it would error in tab tho as well
not a clue
unless its having problems accessing the javascript expansion for some reason?
try this in TAB: '&5Server restarts in &f%server_countdown_DD.yyyy.HH:mm:ss_13.2021.05:00:00%'
see if this works
works fine
also try showing just %javascript_time%
no, i've no idea
Speaking to the author of TAB
being asked this
absolutely 0 idea of how to go about that
I mean you can just show him the javascript code.
but also you can show him that %javascript_time% works
so its not that
its something to do with placeholders in placeholder or something. not sure
yeah, ive shown him all that
as far as I can see, its not PAPI, as it works fine when just /parsing
it seems to just be when we add the placeholder inside the placeholder as separately, everything's gravy
Right
so apparently, the issue is that the Javascript expansion does a null player check and doesnt allow null players
but TAB uses null players as its apparently better for optimisation
riiiight, I think I understand
when the js script calls %server_time% from TAB, it doesnt pass a player, only null
which the JS expansion doesnt allow, it must be parsed with a real player name
Okay, found a workaround
in case you were interested
we edited the JS script a bit
var day = parseInt("%server_time_DD%")+1
var year = "%server_time_yyyy%"
if (day+1 > 365) day = 1
var countdown = PlaceholderAPI.static.setPlaceholders(BukkitPlayer,"%"+"server_countdown_DD.yyyy.HH:mm:ss_"+day+"."+year+".05:00:00%")
return countdown
}
time()
``` works perfectly
so instead of embedding the placeholders inside each other in TAB, its better to resolve them inside the JS one instead
at least while theyre using null players in TAB
but I think there is a way by using your old placeholder if you put it in your player section of your placeholderapi-refresh-intervals in TAB's config, or at least from what I understood of NEZ's answer 🤔
:D
I assume there are other ways of getting around it
but ngl
Ill leave that to people much smarter than I
ive got a solution that works, so that sorts me out
I'm on lots of MC discords :D
so yeah I had to be here x)
imagine not being in 80 discords
imagine not being in 666 discords
:D
how to count non player placed blocks
not possible whit what placeholders exist rn
sorry forgot to say
non player placed blocks break
yep not possible. well maybe possible but there isn't a placeholder for that
okay so i have to find a plugin, that adds some sort of tag to the block that player place
that counts blocks mined
and gives placeholder using papi?
am i right?
probably.
and probably there isn't one out there. most likely you'll need a custom one
Does placeholderapi have a pinger port?
In papis config, what do they think "high, low, medium" tps is?
no idea xD
hahah xD
is there a way to check without like overloading the server?
ye let me check the code
poggers thank you!
return ChatColor.translateAlternateColorCodes('&', ping > 100 ? high : ping > 50 ? medium : low) + ping;
so if ping > 100 then its high
if its 51-100 its medium
and 0-50 is low
oh wait
that's ping
I'm good xD
hahah xD
welp time to see if the server expansion is OS
yep it is
good
return ChatColor.translateAlternateColorCodes('&', (tps > 18.0) ? high : (tps > 16.0) ? medium : low)
+ ((tps > 20.0) ? "*" : "") + fix(tps);```
oh okey
👍
one more question
sure
the tps randomly gets a "*" sometimes, before the number. what this mean?
hmm (tps > 20.0) ? "*" : ""
if tps is bigger than 20
so probably something went wrong or something
make your own expansion I guess. like clone the existing one and remove that
👍
I mean I could give it a try in a couple minutes if you want but when the expansion updates you will have to do this again xD
@true pewter ^
ah hahah thanks but me good, I'll just ignore it ig or use bukkits %tps% placeholder instead if it really bothers me :D
I mean the one that's not colored doesn't do that I'm pretty sure
riiiight
while i'm here, the %server_tps% placeholders shows 3 different numbers, are these the different updated ones?
like the %server_tps_1% etc
I think its time
1 sec almost done changing that
I won't bother removing all that useless stuff just remove the * xD
hahah xD
oh ok nvm
my IIJ is crashing when I open any project
welp
will ping you when I have the build
lmao
or just DM you tit
it*
lmao
just to remove the *? xD
I mean if it bothers you that much. I ain't got anything else to do.
well besides sleep
and do other 100 stuff that I'm just trying to not do
hahah i'm fine with it
when i'm super bored I can try to remove it myself xD
go sleep instead
i'd call sleeping a big brain move
that's why I will do it now, thanks for the help!
nah sleep is for the weak
I'll probably be back here sometime 🙃
hah
have yall banned emotes from other servers
what is this
yeah only server boosters get them
Sombody knows where i can get this again?
I got it once
but cant find it back
%javascript_rewards-delay_Bank_15%
It manages almost half of my server
or did something change?
wait what? someone made you a javascript? or what?
because that's not something public or well known about.
I mean i know who made it
But he left
Since he had a busy irl life
He doesnt come online much anymore
so
yea..
but like if you know who made it don't you know where they posted it?
is it still in discord?
Nope
ah
Couldnt find it there
welp, you could always get it re-made #794429923698802708 #794429922454142986
I'd say give your files another search just to make sure
Yea i was just doing that
I mean if i cant find it
Would u be able to remake it ?
I mean if its been done once its most likely possible to do it again. it will just probably be a bit hard for the person that will remake it
its like nowhere to find
;c
it might be this thought
weird thing
how would it get changed
Just automaticly
it wouldn't
the cooldown javascript is a community script
made by aboody
ah fkkkkkkkkkk
Anyone know why when PAPI is trying to load its just stopped
Like the whole startup process has stopped as soon as it gets to PAPI
How do I upload an update of my expansion?
oh, nvm found it
I guess each new version needs to get verified?
if you are not verified, yes
Gotcha
Heeey!
Is there a way to execute a command with placeholder?
For example /tp %player_bed_x% %player_bed_y% %player_bed_z%
Or does this requires a custom plugin?
as far as I am aware you cannot unless it's through a third party plugin
i.e deluxe menus
however, here's my legal disclaimers: i could be wrong.
I was searching on this website: https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Plugins-using-PlaceholderAPI
And I found this plugin https://www.spigotmc.org/resources/customcommands.14363/
Maybe it could work.
That would be a third party plugin
Yeah, it would be nice that /papi parse executes the command if it is a command.
Or just get that plugin
Why doesn't it work for me? I have HolographicDisplays for holograms. https://i.imgur.com/NDIxTAE.png
Hi, does anyone know a placeholder api that shows ping by ip address? Thanks.
Must have Holographic Extension
I know the %player_ping% but I need one that shows the ping of the server not the player.
and how do I install it? I put in the plugins folder and nothing
?player
Player placeholder not working? If you are using a plugin which supports PlaceholderAPI, and the %player% placeholder doesn't work, then change it to %player_name% and download the player expansion.
Commands:
/papi ecloud download player
/papi reload
see links
o
hmmm
did you install the extension?
iirc HolographicDisplays itself doesn't support placeholders
Can you show me /plugins?
ty
wait what? why HP instead of HE?
and he sent the startup log?
I mean still errors might be there
an explain what's the problem
if I was to guess either wrong PLib version
😔
or wrong use
what's your server version?
oh 1.16.4 I see
can you try this dev build of ProtocolLib?: https://ci.dmulloy2.net/job/ProtocolLib/lastSuccessfulBuild/
oh yeah I get those too but the plugin works. seems like ProtocolLib got an update that removed something
do the placeholders work now tho?
``` https://i.imgur.com/jXAZs6P.png
to errors: https://i.imgur.com/Zs7iETU.png
just update hd
%player_name% not %player%
it works, thans
Does placeholderapi have a pinger port?
it uses the server port you parse it on
But If I open my server port it's bad for my server's security but I'm wanting the placeholder to display "online" when the server is online.
I mean you can't change the port. it uses the port the server is on
unless I guess maybe edit the code itself
hmm
?yaml
You can check the syntax of your configs using the online parser here, https://yaml.helpch.at/
?help
» Give the helpers some details
» Ask suitable questions
» Be polite
» Wait
?paste
Paste Services
When asking for help with a config/menu/code issue please use one of these:
(However we do prefer if you used our paste :))
• HelpChat Paste - Usage
• Hastebin
» Give the helpers some details
» Ask suitable questions
» Be polite
» Wait
that be would more-so on the luckperms side
but you could do it with javascript
I wouldn't expect there to be
but javascript can definitely help
An expansion that allows you to use javascript for processing
• Wiki
• Community Scripts
• GitHub
• eCloud
that's... false
@austere hawk boi
what'r'ye doin spreadin all these lies
the answer is always javascript
and you should know that 😉
The expiry time format does come from PAPI
And I know because I fixed a bug in PAPI TimeUtil class because the formatted expiry time was wrong lol
is that relating to this comment?
that be would more-so on the luckperms side
The actual words are provided by PAPI
All the expansion does is call TimeUtil#getTime for.. seconds? since epoch
makes sense
@vast anchor you still need javascript to do this unless you recompiled PAPI with different values

it's just d right?
dhms
I'm just noticing they aren't actually trying to do translating across languages, just d to days
either way the answer is still the answer
I might PR a couple methods for that like shortTime (currently getTime) and longTime that does like 23d1h5m etc and 23 days, 1 hour, 5 minutes, I already do that in a couple of my plugins so I just have to copy-paste it lol
make a js too 😉
🤢
An expansion that allows you to use javascript for processing
• Wiki
• Community Scripts
• GitHub
• eCloud
wiki has a pretty good quick start tutorial of how to use it
and how to make a script
Any body else have issues with placeholder api on paper?
no? whats the issue?
So on spigot the placeholders show... But on paper and forks of paper they don't.
can't post images one sec
@jolly crystal,
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/ to upload images/screenshots.
With paper: https://i.imgur.com/mrirYop.png
With spigot: https://i.imgur.com/6kwY7xT.png
Hello seeking for help once again of the same thing didn't got really solved the previous time. I have vault essentials and else. Parsing vault's placeholder %vault_eco_top_balance_commas_#% returns the value "0" (Changing # for 1 or whatever number) but when i do %vault_eco_balance_formatted% it returns my current $$. So idk why it does this. Does it require a database to save the baltop players?
I was told before vault + essentials + a economy plugin but why would it need a economy plugin since i am using vault placeholder. If anyone can help me ping me with no problem. Thanks
is there any other placerholder then pinger, can use to check server is online??
Looking at the code of the expansion, it works by fetching the balance for all offline players and then calculating the leaderboard
So perhaps your economy plugin can't fetch balances of offline players, but that doesn't make much sense because it should still show online players
Oh and yeah, it doesn't work if you have Essentials installed
IIRC it was because Essentials was adding their own leaderboard placeholders
is there a placeholder that would parse the xyz coords of the block you are looking at?
you can make one with javascript but don't think there is an existing one tho
Link: https://paste.helpch.at/uzicedujik.js
why it doesn't work and it shows red squares all the time and not green squares when I have already purchased an upgrade
is there a placeholder for some sort of boolean
like, if boolean is true, display that, if false, display this
you can use the Javascript expansion for that
I don't know any
Anyone can help?
have you tried parsing the player has permission placeholders?
to make sure any of them return yes?
I gave myself permission, but nothing happened, nothing changes and all the time progress is standing still
but can you do /papi parse me %player_has_permission_homes.bar.1% then /papi parse me %player_has_permission_homes.bar.2% then /papi parse me %player_has_permission_homes.bar.3% and tell me what they all say
Hello!
Perhaps this question is not directly to the Placeholder API plugin, but still, maybe you can help me.
How can a placeholder be used in a placeholder? For example% javascript_runes. {% Player_name%}
Where {% player_name%} another placeholder should be automatically substituted, but now it is considered just as a string.
so basically you want to use another placeholder as an argument in the javascript placeholder?
yes
then just use %javascript_runes_{placeholder_here}%
ok, i try it
Hi, how would I find out what plugins are using these expansions as I have stopped using these plugins..
13.01 18:28:44 [Server] INFO Expansion ezrankspro is used but not installed. Installing!
13.01 18:28:39 [Server] INFO Expansion ezblocks is used but not installed. Installing!
no strictly PAPI, but trying my hand at a JS expansion of my own to colour the %player_health%, but it isnt parsing, can anyone take a look?
I'm unfamiliar with JS, so im not sure if scope could be causing issues, namely with multiple declarations of a variable in each if statement, but idk if I can declare a variable without assigning it a value
(and I have since corrected the time() line)
My code is
System.out.println("-");
System.out.println("text = " + text);
// replace placeholders
text = PlaceholderAPI.setPlaceholders(player, text, false);
System.out.println("text = " + text);
And the output is
https://imgur.com/a/ulgib2L
The boolean colorize is set to false...but it is still coloring. Any ideas?
Uh? Could you show the placeholder used?
Don't declare the variable inside the body of the if statements
Either declare it upfront and then just assign it a value in the if statement
Or just use return in the if statement
Thought that might be the case, thank you
And you don't need healthString I think, could just use the existing health variable
@lean crystal oh and yeah at the bottom you're calling 'time' instead of 'healthColour' lol
Yeah, I spotted that after I uploaded the pastebin, I had jsut edited an existing script and forgot to change it
how can i add player deaths counter?
im looking for placeholder but i cant find it, does anyone know any
How can I add an expansion to the ecloud?
the Statistic expansion has a %statistic_deaths% placeholder I think
contact funnycube#0001 he'll help you make an account.
%player_name% but it wouldn't matter. It's a code bug, not placeholder because it happens with all placeholders
@flat quartz if you have not updated expansions for the latest papi that could be your issue
I found %statistic_player_kills%but i cant find %statistic_entity_kills%or %statistic_mob_kills% , does it exist?
wdym entity kills
like how many of a specific entity a user killed?
@hybrid leaf
@flat quartz It works for others so probs urs only
how many total kill hostile monsters
%statistic_kill_entity:<mob>,<mob2>%
which I found on third page of placeholder, did you click on blue number son bottom
@hybrid leaf
I have to write all the mobs?
Does it matter that it's 2.10.6
expansions don't color text
Hey, I'm a total noob which needs help with papi expansion. I'm trying to make an placeholder that will return a float dependent on a player rank. Not gonna lie, I ripped off half of the vault expansion code from github in hope that it would work, but it won't register, also it leaves no error in console. What am I doing wrong?
Some do :/
Is it just me, or is %townychat_channel_tag% from https://github.com/PlaceholderAPI/TownyChat-Expansion broken?
I am pretty sure it is supposed to display the tag set in the config from channels, but it just comes out as blank when parsed
It would be a perfect solution to many of my problems, but alas, it is broken.
Is it possible to make a custom placeholder for placeholderapi that only shows if the user have a certain permission node?
Javascript Expansion: https://github.com/PlaceholderAPI/Javascript-Expansion/wiki
Don't send code as a picture, use Pastebin
oh, my bad
https://pastebin.com/Y7MubLRe
A member of staff has requested I move your pastebin.com paste to our paste.helpch.at!
Some other paste services don't have a dark varient and we're all nocturnal.
But pastebin has dark mode-
Probably better to go to #development for actual Java questions
hey how do i make placeholders number say 1k not 1000
javascript
function nFormatter(num, digits) {
var si = [
{ value: 1, symbol: "" },
{ value: 1E3, symbol: "k" },
{ value: 1E6, symbol: "M" },
{ value: 1E9, symbol: "G" },
{ value: 1E12, symbol: "T" },
{ value: 1E15, symbol: "P" },
{ value: 1E18, symbol: "E" }
]
var rx = /\.0+$|(\.[0-9]*[1-9])0+$/
var i
for (i = si.length - 1; i > 0; i--) {
if (num >= si[i].value) {
break
}
}
return (num / si[i].value).toFixed(digits).replace(rx, "$1") + si[i].symbol
}
nFormatter(parseInt(args[0]), 0)``` here is a function that will do this for you. you just need to use `%javascript_<identifier>_<number-here>%`
you can learn how to set up a javascript file here: https://github.com/PlaceholderAPI/Javascript-Expansion/wiki
what I sent above is just the code
for it
thanks
@flat quartz -papi autorank
%a%autorank_daily_time_of_player%
uhhh ok
you want to change the color of the placeholder
whatever the placeholder returns the color code will change it to that color
PAPI shouldn't color text with & in it
but it does even with the colorize boolean set to fslse
false *
no the plugin your using the placeholder in needs to where you add color, if it's in placeholder it will nor work
that has to do with plugins that send color in the placeholder like faction plugins
hello wondered if anyone new how to link TAB and Betterranks IA addon together?
Hello, I come because I want to register on the website.
How to install PlaceholderAPI version 2.10.5?
why would one want 2.10.5?
accounts must be registered manually, contact @funnycube#0001 who can manually create an account
is that the plugin needs this version
what plugin?
1.8.8
1.12.2
1.13.2
1.14.4
1.15.2
1.16.4
v2.10.9 - Latest
v2.10.9 - Latest
v2.10.9 - Latest
v2.10.9 - Latest
v2.10.9 - Latest
v2.10.10 - Dev-builds
🤔
@rapid stream he should be online soon, so he should see this message anyway
dkim, its possible that a plugin can break on papi 2.10.7+
okay
mCore
in which case, the dev should update anyway
oh
i have a fix for that expansion myself
let me try find it
lol
#placeholder-api message perfect
So trying to get placeholders working on tab, https://prnt.sc/wnyzqz
Is there a placeholder for CMI to work?
Use '/papi parse' to test whether the placeholder actually works
If so, tab probably doesn't support using placeholders in this way so you'll need to check their wiki
Hello, anyone know why plugin doesnt display custom heads, i tried /dm reload, /papi reload and /rl but nothing happened, there is a link for config, plz help
Link: https://paste.helpch.at/uvolusekok.sql
=version
=ver <plugin/list>
1.8.8
1.12.2
1.13.2
1.14.4
1.15.2
1.16.4
v2.10.9 - Latest
v2.10.9 - Latest
v2.10.9 - Latest
v2.10.9 - Latest
v2.10.9 - Latest
v2.10.10 - Dev-builds
how do i get betterranks to tab to work?
better ranks work in chat but not on the tab e.g :admin:
how do i do it itemadded says i need this api
Don't waste the time of people in this chat
Ask your question, don't ask to ask
I need to find a msg plugin with papi support
DeluxeChat?
^
Yeah I have no clue what a /msg plugin is and how that would even work with PlaceholderAPI
From: [Admin] test: sup
To: [Admin] test: hi
don't purchase deluxechat just for one feature... I personally don't recommend doing that unless you don't mind spending the money
Yeah I don't know how much deluxechat costs so I can't really say
If it's 10 bucks who cares
Just don't think of it as your only option
Yeah I googled a bit but can't really find any alternatives so far
You can request in like #794429923698802708 or #794429922454142986
plus
if you have an exiting chat plugin
you're going to have to remove that and configure deluxechat (to remove incompatibilities idk)