#placeholder-api
150650 messages · Page 94 of 151
/papi reload works
No, I mean to create the paste manually
Go to paste.helpch.at, paste the log there and save
you're using the Vault expansion for PlaceholderAPI but you're missing the Vault plugin, resulting in an error which prevents PAPI from loading all expansions correctly
either install Vault or go in /plugins/PlaceholderAPI/expansions and delete the Vault-Expansion jar
Hey, I'm using lorecontains:<string>~ on checkitem placeholder to tokens enchantment menu, but when checking Tokenator 1, it checks the Tokenator 10 too, there's a way on making it work?
Now using:
requirements:
1:
type: string equals ignorecase
input: '%checkitem_lorecontains:Tokenator 1%'```
Loreequals ?
Pickaxe has more than 1 lore
that probably wouldn't work with multiple enchantments
and the place of the enchantment is not ordered
so a player could have it on lore 3 line, other on the 4 line, etc
so I don't think loreequals would work no?
nope, and I don't think lorecontains has any way of doing what you want either
I'm 99% sure lorecontains means "one line contains"
and loreequals means "one line equals"
doesn't seem to

maybe you could suggest a hasloreline:<exact text> parameter on GitHub https://github.com/PlaceholderAPI/CheckItem-Expansion/issues
Can you make a second view requirement and invert the logic for lore DOESNT contain Tokenator 10
lorelinecontains and lorelineequals
yeah
👀
that's not a bad idea x)
yeah that's a good idea too
Well not exactly
If thats from tokenenchant, i think it has a placeholder to get the level of an enchantmen
what’s max level of tokenator
gems enchantments is a plugin?
what
but I'm doing gems enchantments with playerpoints
basically enchantments buyable with playerpoints instead of with tokens
Do you have a system that uses one or two plugins and not 20? 🤣
Ok but I'm asking what plugin handles the enchantmens, idc about the whole system
Ah, tokensgc
Link?
actually that's a very bad now that I've just realized x)
both placeholders wouldn't check for the same items, which means that the second placeholder could check for any item that's not enchanted as well
I don’t use this plug-in i just randomly opened the channel, i figured it wouldn’t work anyways cuz anything from 10-19 and 100-199 etc would need excluded depending on max level
%tokens_<enchantName>_level%
though it only works with the item in hand
%tokens_<enchantName>_level% - Shows the current level of the given enchantment applied to the item in hand of the player
yeah works fine with that placeholder, sorry to bother you, didn't know that placeholder exists 🤦
thanks all for the help ❤️
Btw, there's something to generate more levels to avoid doing it manually 100 times?
without having knowledge of python
Nope
uuuuh, gl
And I wouldn't use the JavaScript requirement for that
I know it looks prettier or whatever, but is just extra overload for no benefit in this case
So just a string equals?
Yeah, and >=
requirements:
1:
type: '>='
input: '%tokens_Credits_level%'
output: 1```
basically that
it's more optimized?
than javascript
java.lang.NoClassDefFoundError: org/bukkit/plugin/java/JavaPlugin
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1012)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
at net.md_5.bungee.api.plugin.PluginClassloader.findClass(PluginClassloader.java:152)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587)
at net.md_5.bungee.api.plugin.PluginClassloader.loadClass0(PluginClassloader.java:66)
at net.md_5.bungee.api.plugin.PluginClassloader.loadClass(PluginClassloader.java:59)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
at net.md_5.bungee.api.plugin.PluginManager.enablePlugin(PluginManager.java:340)
at net.md_5.bungee.api.plugin.PluginManager.loadPlugins(PluginManager.java:250)
at net.md_5.bungee.BungeeCord.start(BungeeCord.java:271)
at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:67)
at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15)
Caused by: java.lang.ClassNotFoundException: org.bukkit.plugin.java.JavaPlugin
at net.md_5.bungee.api.plugin.PluginClassloader.loadClass0(PluginClassloader.java:103)
at net.md_5.bungee.api.plugin.PluginClassloader.loadClass(PluginClassloader.java:59)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
... 13 more```
help me pls
Yes, you are doing a trivial comparison, javascript is meant for more advanced stuff
mean i can't use this on bungee ?
perff ty gaby!
nope
ahhh ok
https://gist.github.com/1335042cb3c0c87518fd50072104613a
any idea how would i use that placeholder?
pluginMain.getPlugin().getServer().broadcastMessage("{tasoLF_hearts}");
this doesnt cut it
PlaceholderAPI#setBracketsPlaceholders
thanks it works 🙂
Np
So I have my time set. I was wanting to add where it adds/changes to PM/AM depending on what time it is (real time).
%servertime_hh:mm%
What do I need to add to this ^ to add that AM/PM?
Thank you so much! Also I know a server with the server logo on their scoreboard. Do you know how this is done?
how can I make holograms update?
now that holographic extension does not work on latest version
Would it be possible to make a javascript to show how many players are on, but only those with perms. Also, check if player is in vanish, idk
%supervanish_isvanished% returns a boolean
is there anyway to hook Papi into a discord.js bot?
If you want to write a REST API that is ran on the server, sure.
Hey, someone knows if it's possible to use %server_countdown_HH.dd.MM.yyyy_11.15.08.2022% inversed?
like showing days/hours/minutes of time passed from a date
you don
don't need javascript for that
you could just use the playerlist expansion.
But it doesn’t detect vanished players
well you can set the condition to be a placeholder as well. not just permissions
@junior musk can you have multiple conditions with your PlayerList expansion?
no, but the placeholder subtype can probably help
wait actually
I don't remember if I posted the update x)
nope
you can have multiple placeholder separated with +
how can I make holograms update?
now that holographic extension does not work on latest version
do i have to like remake all my holograms or somethign?
and does it still use the {fast} {medium} {slow} notation?
i'm confused, does this work with placeholderapi tho?
placeholders:
'[x]': █
'[/]': ▌
'[.]': ░
'[..]': ▒
'[...]': ▓
'[p]': •
'[|]': ⎹
'%outpost_specific_forest_capped_team%' = %outpost_specific_forest_capped_team%
this seems odd, am i doing it wrong?
i tried that
I guess
the changelogs say that
PlaceholderAPI's placeholders are refreshed every tick (configurable in the future) and they are not optimized yet. Performance may be affected especially if there are slow placeholders
idk if he did add the config option though
i see
for some reason on boot, i get
[PlaceholderAPI] Failed to load class files of expansion.
java.util.concurrent.CompletionException: java.lang.NullPointerException: Cannot invoke "java.lang.Class.getClassLoader()" because "result" is null
at me.clip.placeholderapi.expansion.manager.LocalExpansionManager.lambda$findExpansionInFile$7(LocalExpansionManager.java:428) ~[PlaceholderAPI-2.11.3-DEV-160.jar:?]
but its resolved just by /papi reload, this is on placeholderapi 2.11.3-dev 160, this occurs on 2.11.2 aswell. i assume people are aware of this but not exactly sure what to do untill its patched if it hasnt already been.
worse thing is its intermittent, sometimes it boots fine sometimes it does this.
ok looking back at another issue relating, its a bug with pufferfish that has already been patched on a latest version...
kinda wish it was backported to 1.19.0
owell guess ill update to 1.19.2
Hello, good, does anyone know how I can put that progress bar in my holograms and that as the server fills up, the bar also fills up?
Can anyone help, getting this error after downloading townychat and trying to reload https://pastebin.com/SHerzpkk
parse others is not working for deluxemenus
for me
- 'FE6FC{player}''s Information:'
- '&7➥ Money: &f%parseother_{player}_{vault_eco_balance_formatted}%' #%parseother_{player}_{vault_eco_balance_formatted}%```
using args within the command for it
Plugin DeluxeMenus v1.13.5-Release generated an exception while executing task 1285717
because you didn't use an arg, you just put player 😉 %parseother_{{player}}_{...}%
is there any placeholder to return the amount of players in a specific WorldGuard region
do i need any expansions to run papi on a bungeecord server?
cus rn none of the placeholders are working
PlaceholderAPI doesn't run on the proxy.
@trim mist im not that smart with that you mean it doesnt run on the waterfall server or any server connected to it?
It does not run on BungeeCord, Waterfall, Velocity.
oh
It runs on Spigot, Paper, etc.
Yes, it can go on there.
well the weird thing is its not working rn
bungeecord placeholders dont work (but ig thats why
but all regular ones also dont show up when i put them in a holo or parse them
Also /papi dump please
hey!
when i run /papi ecloud download insertextensionnamehere then /papi reload I lose all my extensions
except if they are from plugins
if i reboot i get the extension i downloaded + all my others back
if i try to register those extensions that didnt load nothing comes back
i'll get a papi dump and logs later
nevermind.. /papi dump responds with nothing
?paste
Do you like... have commands off in your chat setting or something?
nope
i used f3 d before hand
same thing happens when i try to register an extension
i'll grab it in a minute, friend is eating
wdym
oh ur responding to him
who is he responding to
Hello, is there a way to show player's custom time (set by /ptime), the only placeholder I found is %player_time% but I believe it's in milliseconds
take a look at the LocalTime extension, might work for this case
but it may not set by that
I use Localtime for real world time, I don't think it can actually show the time in game
which is what I need
yeea no idea
this is the output of %player_time%
it shows player's current time but in this weird format
Not sure if I can use this expansion somehow to transform it into hh:mm format
I could use skript for that but I have no idea what that output actually is
and the length of the output is different each time so it could be tricky to split it and calculate the time
https://i.imgur.com/mFJYR2O.png it's not milliseconds for sure
unix mills
I think that the easiest way to do this is to actually set the placeholder to %player's time% from skript
Not sure how performance efficient that would be but I'll try it
can i fill placeholders for offline players?
It depends. Some placeholders support that, some don't
Some can't
ok thanks
You can use the progress expansion
%progress_bar_{server_online}_c:&3■_p:&e■_r:&7■_l:10_m:100_fullbar:&cFull!%
Change the value after max with the maximum amount of players the server can have
It seems like you might either be running an outdated version of the townychat plugin or you don't have it at all or the towny chat expansion is outdated
No
Tho you could probably make one with the PlayerList expansion
Issue was resolved when I reinstalled papi, prococolib and vault so one of them was broken lmao
And for bunguecord?
PlaceholderAPI v.2.11.2
Math latest download extension
[PlaceholderAPI] [math] Invalid Placeholder detected! [PlaceholderAPI] [math] Placeholder: %math_0_{mmocore_experience}% [PlaceholderAPI] [math] Cause: '{mmocore_experience}' is not a valid Math Expression.
what placeholder to use to show the kills
Does it work with other placeholders outside of MMOCore ones?
I will try with %math_0_{player_health}%
No I have no more error with another placeholder
He sell the account
and hackers are trying to upload JavaScript
dont verify it
0.0.3
what? @austere hawk ?
a developer sell their account and now are uploading JavaScript extension
see disease 0.0.3 code
Mind DMing me the name? and info
and 0.0.4
0.0.3 disase is javascript
download and watch the code
i cant now
the developer sell the account to a “Hacker”
@sharp jay plis check it
Having higher ups check
the Developer sell the account for upload javascript
Do you have proofs @austere hawk ?
Hello! I made an expansion and wanted to upload it to the eCloud, but I couldn't create an account on your website. It told me account creation is locked, and linked me to your Discord. Could you tell me how I can add my expansion to the cloud?
see the code
.
I'm talking about this
Hi there, I'm trying to nest placeholders in featherboard but it doesn't seem to have compatibility with a lot of expansion packs, is there a better way to do it in PAPI? Currently my scoreboard parses "%moregradients_custom_{luckperms_meta_colors}_{luckperms_meta_cleanname}%" (Because the gradient effect that comes with featherboard also doesn't work for me on 1.19.1)
And when it shows up it only parses the {luckperms_meta_cleanname} on the board. Any ideas?
try /papi ecloud download NestedPlaceholders
/papi reload
%nested_moregradients_custom_{luckperms_meta_colors}_{luckperms_meta_cleanname}%
👌
hello I was wondering on how to use the server countdown placeholder since I couldnt find a detailed tutorial on how to do it.
could I get a example?
oh nvm i cant read
%server_countdown_<SimpleDateFormat>_<time>%
e.g. %server_countdown_dd.MM.yyyy_01.01.2020%
%server_countdown_18.08.2022_18.08.2022% like this?
nope
%server_countdown_<SimpleDateFormat>_<time>%
the simpledateformat is dd.MM.yyyy in the example
next example:
%server_countdown_yyyy.dd.MM_2020.01.01%
%server_countdown_2022.18.08_2022.18.08% the cooldown is for tmr
%server_countdown_2022.18.08_2022.18.08%
the bold thing
need to be simple date format
which looks like this dd.MM.yyyy
%server_countdown_18.08.2022_2022.18.08%
no like
check examples on this page https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html
by <SimpleDateFormat> you will define how the time is "processed"
idk how to explain
um I dont quite understand but its day 18 then month by 08 then year 2022 right?
but its day 18 then month by 08 then year 2022
you define that by SimpleDateFormat
if the SimpleDateFormat is dd.MM.yyyy then its day then month then year
if the SimpleDateFormat is MM.dd.yyyy then its month then day then year
so then the 2nd part would be the same as the first?
oh you mean the simple date format in config?
wdym what config
SimpleDateFormat in the placeholder
%server_countdown_<SimpleDateFormat>_<time>%
in <SimpleDateFormat> you will define "format" how you specify the time
so if <SimpleDateFormat> is dd.MM.yyyy
and want the time to be 1st july 2023
then the <time> part will be 01.01.2023
oh ok so simpledateformat would then be the same as time?
yea
ok so then how would I insert a specific time in the day like 3pm
alright I will try it
ok I got it to work since it said 0 the whole time because the timer for tmr reached below 24 hours
uh
whered the javascript expansion go
👍 thanks
(i searched it up on the discord logs)
Hello
I am trying to make a website that can use info from my minecraft server to display statistics, does anyone know how I would go forward with this?, probably not the right place to ask but thought I'd give it a try 🙂
your own website? or some like tebex?
Hello! Who do I need to contact about getting an account to upload a new expansion to the ecloud?
Do you already have an expansion ready to be uploaded?
All sorted 😉
👍
what was the placeholder for player number (for example if im the 5th player to ever join the server it will return 5), i lost the english word
(ping if you know)
Can someone tell me what the variables of the guild scoreboard are?
if you need it for essentials, it is {UNIQUE}
nope,i need one i can use in chat
i dont use essentials there
sup folks, %statistic_junk_fished% doesnt seem to be real statistic, its not mentioned in https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Statistic.html, yet still mentioned in placeholder list - https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Placeholders#statistic
as well in tab completion -
https://prnt.sc/2f5IbQimxEH-
(https://prnt.sc/GPtr5KiapUAJ - pic for reference)
How to make placeholder (JS), that can pick variables from placeholder (ex. %javascript_somehere1_somehere2_somehere3%) ?
use {placeholder}
%javascript_{some1}_{some2}%?
so, i cant put there anything?
like %javascript_{color1}_{color2}%
return player's nickname formatted with gradient
what's your nickname plugin?
i havent any other example
use that
and do /papi ecloud download Gradient
/papi reload
ok, but how to pick variables from placeholder's name like this?
no.
you just need to change the colors
args[0]
rlly? omgggg thanks!!!!
sorry, it took me some time to understand 😅
here's a guide on how to work with arguments in JS
https://github.com/PlaceholderAPI/Javascript-Expansion/wiki/Advanced-Scripts#arguments
oh. thanks! you best!
woooow. js expansion have a lot of functions.
also, data stores forever? https://github.com/PlaceholderAPI/Javascript-Expansion/wiki/Advanced-Scripts#storing-data
it stores them to a file, so yeah
but I've heard it had some issues, not sure
or maybe not
idk, try it and see I guess 😅
hi, I downloaded the placeholder "server" and gave papi reload and then added "%server_name%" to the tablist and it still shows me "A Minecraft Server" even though I have Lobby-01 in server.properties
the placeholder returns whatever you set in plugins/PlaceholderAPI/config.yml
server_name: A Minecraft Server
change %server_name% ?
or?
yeah
I am trying to add PlaceHolderAPI support to my plugin through maven. I have added the dependency and repository, but whenever I try to do something like this PlaceholderAPI.setPlaceholders(event.getPlayer(), joinText);, it gives an error. I tried to manually add the import statement, but that did not work either.
same problem
sorry
did you reload using /papi reload?
server restart
what error?
It just gives a red underline, and says that it is not a valid symbol
[19:04:45 ERROR]: Cannot load plugins\PlaceholderAPI\config.yml
org.bukkit.configuration.InvalidConfigurationException: while scanning for the next token
found character '%' that cannot start any token. (Do not use % for indentation)
in 'string', line 38, column 19:
server_name: %server_name%
^[19:04:45 ERROR]: Cannot load plugins\PlaceholderAPI\config.yml
org.bukkit.configuration.InvalidConfigurationException: while scanning for the next token
found character '%' that cannot start any token. (Do not use % for indentation)
in 'string', line 38, column 19:
server_name: %server_name%
^
hmm
Here is what I used for the dependency and repository
Denpendency: <dependency> <groupId>me.clip</groupId> <artifactId>placeholderapi</artifactId> <version>2.11.2</version> <scope>provided</scope> </dependency>
Repository: <repository> <id>placeholderapi</id> <url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url> </repository>
ugh
you're making the server name a server name placeholder?
that will literally do nothing and instead will just return back the placeholder itself
anyways put it inside quotes
server_name: "%server_name%"
try refreshing maven a bunch of time. I've seen this issue very many times reported in #development and usually its what's happening.
it should display the server name in the tablist
yes. so change the option to your server name
you can't get the server name from server.properties with that placeholder
That worked, thank you!
so set server_name: to server_name: "Lobby-01" or whatever.
no problem. also might want to look into gradle sometimes. just saying xD https://wiki.helpch.at/piggys-barn/java/gradle
ok
I was just wondering if it would be automatic
is there any way to automatically show server name in tablist?
not from the server.properities file
just set the server name in your placeholderapi config.yml tho
its not that much work
to just set server_name: "Lobby-01"
and then use %server_name%
No is not, the name used to be a setting in server.properties but it was removed
You can, obv
Hi, is there any way to count the number of players on multiple servers? but not on the whole bungee only on selected servers and to show it in one number
I want to make a minigame, but there will be more servers for it so that it points to the lobby from all those servers in one number
you could try the bungee expansion + the math expansion
for example %math_0_{bungee_SERVER1}+{bungee_SERVER2}% would count the players from the servers SERVER1 and SERVER2
ok, thanks
Hey! I uploaded a new expansion, and I was wondering if it could get verified?
(https://api.extendedclip.com/expansions/playerstatsexpansion/)
is there a placeholder for this? I can not find him
I'm not trying to rush you, but could I get an indication of how long it could take for you to verify my expansion?
[12:59:02] [Server thread/INFO] [me.clip.placeholderapi.PlaceholderAPIPlugin]: [PlaceholderAPI] Fetching available expansion information...
[12:59:02] [Server thread/ERROR] [me.clip.placeholderapi.PlaceholderAPIPlugin]: [PlaceholderAPI] Failed to load expansion class JavascriptExpansion (Is a dependency missing?)
Is that the entire error? nothing under?
you should probably install the one from the ecloud as it is more updated
i get error when downloading from ecloud
also i use magma (forge+bukkit)
can this make error?
here also this error
https://paste.gg/431d8c9901974504876df946682375c6
Yes. its actually very common
Inotsleep 
Hi there, i have this issue with PAPI
https://paste.gg/p/anonymous/bed905370da142c586954121bbec4700
either remove the quests expansion or install the quests plugin
Ty!
is there a way to keep the plugin btw? (Because i have the plugin)
nevermind i updated the quests plugin and it work xd
is there placeholder for max players?
%server_max% I believe
thanks
Ctrl+F?
what did I give you? Link is broken atm
<@&639756260874387476> i have spam on my email to reset the password
and i don't even try to reset my Password
@simple cosmos
any way to double change placeholders like the player pefix is a placeholder but i get that placeholder from a placeholder
sooo %player_perms% -> %img_adminrank% -> an image
how do i turn %player_perms% into image cos i just get %img_adminrank%
you can use the nested placeholders expansion or whatever it is called
tysm
cant find Nested in github list
found it
Hey, does anyone know why %vault_eco_balance_formatted% returns money in this format?
It should be 48.50k (like before), now it shows up as 48.50$k
I've tried updating the expansion but that didn't work
anyone know how to remove one item using checkitem
use the amt modifier
%checkitem_remove_mat:diamond,amt:1%
thanks
no is not, that is per player
Essentials msgtoggle emsgtoggle Blocks receiving all private messages. /<command> [player] [on|off]
Hello, is there an extension that supports showing users on a proxy (velocity)
I cannot find one anywhere
And unsure where else to ask, sorry if it's the wrong place
wait so what do I do??
it works with this command
the placeholder is not linked to /ignore but to /msgtoggle
so it tells you if your entire DMs are closed or not
show the amount of players or a list of them?
you want to check if a user ignored another user?
or what exactly?
yeah
I have have toggle button
and need a placeholder to see if you have blocked that user or not
doesn't look like there's a placeholder for that
;-;
So I've looked at the code and it seems like what happens is that the expansion takes the 48.500000 number and gives it to vault to format then appends the k at the end. So vault is adding the $. Or maybe a plugin that uses vault
yeah. it definitely seems like plugins can take over the format method from Vault. So one of your economy plugins is adding the $ at the end.
umm
the only plugin I remember which changed the economy was deleted, is it possible for the changed format to stay even after that?
try running the /vault-info command to see if you maybe have another plugin handling economy.
oh essentials definitely has an option to add a currency symbol
or something like that
idk if that option also changes it in vault tho
nope, I was using the dev version before and then I uploaded a stable one
so that broke it for sure
I guess I'll have to regenerate my configuration
hello
how to use math expansion for another expansions? like %playerpoints_points%+%vault_eco_balance_fixed%
%math_0_{playerpoints_points}+{vault_eco_balance_fixed}%
thanks
hey there, papi is simply not working even after refreshing, redownloading the latest addons, and restarting the server
any troubleshooting tips?
trying to parse something doesnt work
nvm. for some reason the Quests addon completely broke everything
Where do I use vault placeholders to customise how essentials /baltop command shows the format of balances? I would like it to display 1,000,000 as 1M rather than 1,000,000 etc
You can not customise how money looks in the /baltop command of essentials.
I think they let you customize colors but that's it
not how money is formatted
unless they have a config option directly in essentials maybe
I didn't understand how "Config" expansion works
how can I do a javascript that chooses a string from a list of strings randomly?
Suggestion
Bungee / Velocity
to have placeholder that checks if other server online or not
instead of having port forward and use pinger
Got a working soltuion
you need to also create the random function btw
that method doesn't exist in javascript
yep I raelized now lol
btw, you don't need to use JS for this at all. You can just use the String expansion instead
oh
you declare config files in plugins/PlaceholderAPI/config.yml and then you can set options there and use a placeholder to display those options. for example if I add the example: /plugins/PlaceholderAPI/configs/test.yml, and I create that file and in it I put yml this: "is a test" and you use %config_example_STRING_this_DEFAULT-VALUE% it would display is a test.
it only supports yaml files and a few types: BOOLEAN, DOUBLE, INT (or INTEGER), LONG, and anything else would be considered a string
or rather it would get it as an object and run the #toString method on it
bruhhh that would have been so useful for me a while back
Hi, latest stable version of Essentials breaks vault's %vault_eco_balance_formatted% placeholder. If you, for example, have 1000$, it will show up as 1$k. Is there a way to fix this?
Sorry if this is not the right place to ask, they told me that Essentials doesn't manage papi's placeholders and that they can't do anything about it
I downloaded the add-on to most from here: https://ci.extendedclip.com/job/Server-Expansion/ But this placeholder doesn't want to start, what should I do?
Please help me https://hastebin.com/ubalanofiz.properties
Hi, isn't there some placeholder or plugin so I can edit the text (server name, links, etc...) only on the bungeecord server?
[17:22:12 ERROR]: [PlaceholderAPI] Failed to load class files of expansion. java.util.concurrent.CompletionException: java.lang.NoClassDefFoundError: com/artemis/the/gr8/lib/kyori/adventure/text/TextComponent at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[?:?] at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[?:?] at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770) ~[?:?] at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760) ~[?:?] at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] Caused by: java.lang.NoClassDefFoundError: com/artemis/the/gr8/lib/kyori/adventure/text/TextComponent at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:?] at java.lang.Class.privateGetDeclaredMethods(Class.java:3402) ~[?:?] at java.lang.Class.getDeclaredMethods(Class.java:2504) ~[?:?] at me.clip.placeholderapi.expansion.manager.LocalExpansionManager.lambda$findExpansionInFile$7(LocalExpansionManager.java:413) ~[PlaceholderAPI-2.11.2.jar:?] at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?] ... 6 more Caused by: java.lang.ClassNotFoundException: com.artemis.the.gr8.lib.kyori.adventure.text.TextComponent at java.net.URLClassLoader.findClass(URLClassLoader.java:445) ~[?:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:587) ~[?:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?] at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:?] at java.lang.Class.privateGetDeclaredMethods(Class.java:3402) ~[?:?] at java.lang.Class.getDeclaredMethods(Class.java:2504) ~[?:?] at me.clip.placeholderapi.expansion.manager.LocalExpansionManager.lambda$findExpansionInFile$7(LocalExpansionManager.java:413) ~[PlaceholderAPI-2.11.2.jar:?] at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?] ... 6 more
im getting this error after updating to 1.19
whenever i try reloading the papi
That is mine, and that will be because you are probably not using PlayerStats version 1.7
So if you update PlayerStats, it should work 🙂
Just out of curiosity, I see some expansion owners are verified developers. Is it possible to obtain said role or do my expansions always need to be manually approved?
Hi, can placeholder expansion have - in its name?
no
wait actually
it might. I know it can't contain _
let me check
yeah it might allow it. don't see why it shouldn't.
thx
I know that it doesn't like underscores and possibly might only accept lowercase letters but afaic tell that's all the limitations
hello, papi dont show custom javascript scripts and shows only %javascript-progress-bar% etc. i didnt get any error it looks like papi ignores js
oh, somehow js extension isnt downloaded but it was
what is the command to download it?
You have to download it manually for now
and after javascript should be an underscore _ not a dash -
oh thats why im getting error
yes i got it right, but I wrote it wrong here, ty
could u tell me how?
https://api.extendedclip.com/expansions/javascript/ you have all instructions here
❤️
ehy umh-
[19:27:59] [Server thread/WARN]: [PlaceholderAPI] Cannot load expansion vault due to an unknown issue.
Why is not even showing the error?
tried enabling debug in config but seems to be kinda useless xd
anyone else having issues with papi on startup? i've seen 2 servers today, one 1.19.1 another one 1.8.8 getting stuck on loading papi
Mine is on 1.19 and was loading but i got the vault error
weird, my guys didn't get that far even
nation:
type: 'string equals'
input: '%townyadvanced_nation%'
output: 'Testnation'
any idea why this is not work in dm?
requirements: notier: type: string equals input: "%placeholder%" output: "result"
must look like this one
the '' doesn't worl, you mus use ""
try this:
nation: type: string equals input: "%townyadvanced_nation%" output: "Testnation"
Unfortunately it still does not work
/papi parse me %townyadvanced_nation%
can you send a picture of what that returns
cant send pictures here
ah ok
another towny placeholder with "true" "false" output works.
no idea?
Try to add "" around the placeholder, maybe it has some space(s), or even color
"&c%placeholder%"
There are a lot of colours. Thought the output is always clean?
Like this?
requirements:
notier:
type: string equals
input: "%placeholder%"
output: "result "
Is there any way to list guild war wins in a top 10 hologram?
@tawdry pecan no, I meant on the parse command, sorry
And use the actual placeholder, I'm on mobile and cb to type it all xD
Is placeholderapi include a restapi?
papi is not a rest api
it is a library used to display placeholders in various places in a minecraft server (menus, scoreboards, tablists, etc.)
OK, ty.
Does the api support wildcards?
for what?
Advancements
it depends how the expansion is made
hello, what are the FULL essentials placeholers?
@austere hawk -papi essentials
hello im new with the placeholders but is there a placeholder that displays all player names?
Hey i got this error when i reload it
[17:18:48] [Server thread/INFO]: iDrunK issued server command: /papi ecloud download Player
[17:18:48] [placeholderapi-io-#1/INFO]: [PlaceholderAPI] Fetching available expansion information...
[17:18:52] [Server thread/INFO]: iDrunK issued server command: /papi reload
[17:18:52] [Server thread/INFO]: [PlaceholderAPI] Placeholder expansion registration initializing...
[17:18:52] [Server thread/INFO]: [PlaceholderAPI] Fetching available expansion information...
[17:18:52] [Server thread/ERROR]: [PlaceholderAPI] Failed to load class files of expansion.
java.util.concurrent.CompletionException: java.lang.NoClassDefFoundError: com/artemis/the/gr8/playerstats/statistic/request/StatRequest
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[?:?]
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760) ~[?:?]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?]
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?]
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?]
Caused by: java.lang.NoClassDefFoundError: com/artemis/the/gr8/playerstats/statistic/request/StatRequest
at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:?]
at java.lang.Class.privateGetDeclaredMethods(Class.java:3402) ~[?:?]
at java.lang.Class.getDeclaredMethods(Class.java:2504) ~[?:?]
at me.clip.placeholderapi.expansion.manager.LocalExpansionManager.lambda$findExpansionInFile$7(LocalExpansionManager.java:413) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
... 6 more
Caused by: java.lang.ClassNotFoundException: com.artemis.the.gr8.playerstats.statistic.request.StatRequest
at java.net.URLClassLoader.findClass(URLClassLoader.java:445) ~[?:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:587) ~[?:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:?]
at java.lang.Class.privateGetDeclaredMethods(Class.java:3402) ~[?:?]
at java.lang.Class.getDeclaredMethods(Class.java:2504) ~[?:?]
at me.clip.placeholderapi.expansion.manager.LocalExpansionManager.lambda$findExpansionInFile$7(LocalExpansionManager.java:413) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
... 6 more
Nothing for this?
Update PlayerStats to version 1.7, that should fix it
(Or put PlayerStats on the server if you don't have it - you can't use the PlayerStatsExpansion without it)
Can anyone tell me how to get an eCloud author account to upload ones expansions?
Currently not open for new accounts. If you have an expansion for a plugin, just put it in the plugin itself.
I honestly wondered why users don't do that in the firstplace.
Cause you need the plugins to use most of these expansions.
Alright, thanks for the information.
I might have some insight there @jolly crystal
I recently made an expansion after some people asked if I could make placeholders for my plugin. I didn't know anything about PlaceholderAPI before that, so I looked into it and read all the guidelines. The wiki guides presented both options (making a separate jar vs working inside your plugin) as equally valid, and I couldn't find any reasoning as to which one is better. If I'd read anything on the wiki about one of the options being preferred, I would have gone with that. Eventually I decided to go with external, to keep my original plugin more concise and to-the-point in what it does (and to challenge myself to make a good API for my own plugin). I only found out you do have a preference after my expansion was all done and I had to join this discord to get an account for the ecloud.
I can now also see why the preference is there (given there's already been 2 people in here with version mis-match related errors for my expansion), but again, I didn't know that beforehand.
I'm receiving https://hastebin.com/jesahegofa.sql after trying to run /papi reload when i've downloaded the TownyChat hook. Can anyone advise how to fix it?
does PlaceholderAPI has an internal parse placeholder?
example: %papi_parse_{player}_{placeholder}%
parseother
/papi ecloud download ParseOther
/papi reload
%parseother_{Tanguygab}_{vault_eco_balance}%
The version of the expansion is not compatible with the version of TownyChat
Where can I find an old version of the expansion?
Thanks Glare
still waiting an answer for this 🥲
@strong edge try removing it and doing /papi ecloud download <expansion>
Any have Placeholder for https://www.spigotmc.org/resources/tokens-multi-plugin-support-mysql-support.71941/
Is there a placeholder that would allow me to let's say replace any 1 2 3 4 5 6 7 8 8 9 0 to ₁ ₂ ₃ ₄ ₅ ₆ ₇ ₈ ₈ ₉ ₀?
Like if a value contains any of the following, get replaced by the corressponding number
And is there a placeholder for the last amount of damage the player hit something for?
I see %player_last_damage% exists, but it's for last damage input, would something like %player_last_damage_output% exist somewhere?
no
No to which?
Damage
Hmm alright
As for replacing characters, you probably have to use javascript
Shoot. Don't think I could since the damage thing doesn't exist
I'm using DecentHolograms and they have a damage hologram, but I want to use the smaller numbers instead of the normal ones and they don't directly support that
Rip
If this hologram has placeholders for last damage given, you can try to make a js placeholder and pass that damage placeholder as argument, if it works, then just add the replace logic
so %javascript_scriptname_{damage}% and then inside the script access it with args[0] and replace one of the number with your character
It may or may not work, worth a shot
I might be able to figure it out, though I don't have tons of experience with js
I'll see, thank you!
is just a chain of replace('number', 'character')
Ah
args[0].replace().replace()...
Are these numbers like those "small capital letters"?
Yeah
Typically I wouldn't use those numbers, but I found plus & minus symbols that coincide REALLY well with them
I just think it would look neat for the damage/regen indicators.
This isn't finished, but something like this right?
return args[0].replace('[', '');
}
damageIndicator();```
yeah
Sweet, I'll give it a try. Thanks a ton for the help
Np
Tomorrow I will look into integrating something in the string expansion if Blitz is ok with it
For sure, that'd be awesome
The formatter expansion has a replace thingy, it's just replace EXACT string and not replace all
Yeah
A replace all strings option could open the door to a lot of sick things
I think about %string_replace_characters_<configuration>_<input>% where configuration is a map defined in config
small-capitals:
A: <replacement>```
Np
@turbid tide leaving this here so you can check in the morning
@warm plover
papi parse GabyTM %string_replaceCharacters_small-numbers_1234%
[09:58:11 INFO]: ₁₂₃₄
papi parse GabyTM %string_replaceCharacters_small-numbers_1234aaa%
[09:58:16 INFO]: ₁₂₃₄aaa```
```yaml
string:
replacements:
small-numbers:
'0': ₀
'1': ₁
'2': ₂
'3': ₃
'4': ₄
'5': ₅
'6': ₆
'7': ₇
'8': ₈
'9': ₉```
Thank you, i'll try that later
umm. @vivid sparrow why add presist to the String expansion? That's only needed for internal expansions
alright
done
can you also build me a jar so I don't have to download the expansion?
merged btw
this with the persist or without?
without
alright. thanks. pushing an update on the ecloud now.
how the hell do I update? is it the add version button under the Versions page?
yeah :))
Awesome, thanks so much
?
Is it the good version ? or do you have modify the .jar ?
i didnt
Does anyone know of any placeholders that display a list of all the current online players (not a count)
It looks like you're trying to use the PlayerStats expansion without PlayerStats, so if you download PlayerStats (v1.7) that should work
That is a java-version error though, and I'm not sure where that one is coming from. The expansion and PlayerStats itself are both built with java 16, and that should work on 1.16.5... If you still get this error after downloading PlayerStats, let me know and I'll see if I can help
nvm i have reinstalled it, i think something was wrong with it
but after reinstall it worked
Perfect 🙂
How do I use CheckItem to detect nbt that I add to items using other mods xD
I tried the approach written above, but it didn't work very well
1
Are you sure that it's even capable of checking NBT tag from a mod? Plugins don't usually work well with mods
No, I just used that mod to change the nbt of the original item, and I think there should be no problem
Send a picture of /papi parse me %checkitem_getinfo:mainhand_nbtstrings:% while holding the item @elfin viper
There will be an empty line
/papi parse me %checkitem_getinfo:mainhand%
name:Test mat:REDSTONE amt:1 data:0 lore:Test enchanted:false nbt:
The nbt: is empty
Yeah, I'll just have to see what else I can do
what are you trying to check? Switch:1b ?
checkitem will only work for int and strings
Yes, the Switch
ok
Well, it shows up when I change the type
Thanks for the answer. What do I do when I get it xD
so if you want to check for the item do %checkitem_nbtints:Switch=1%
%checkitem_remove_nbtints:Switch=1% could remove it
although if you have multiple items you might want to also specify material, amount, etc.
Okay, thanks
Whom pinged me?
Hi i have an error regarding placeholder api on startup how would i go about posting it ?
my placeholderapi in 1.19 somtimes does not start . and after reloading papi it works . also it have a problem with bungeecord placeholder extention .
Has anyone seen this error in console before and if so what might be causing this.
hellos. im creating an internal expansion for a plugin rn. i want to make it so that %pluginname_block_blocktypehere_total% returns a value from config. how can i accomplish this?
so something like %plugin_block_gold_block_total%
resolved. i split up the params by _ and limited to the first _ before the block name itself. returned plugin.getConfig().blahblahyouknow
why i can't install js extension?
Is it possible to retrieve information about other proxies on bungeecord.
Example, I am in Server B and I want to retrieve information about Server A.
I use /papi ecloud download Pinger but that doesn't give as much information.
👀
?
you'll have to create custom expansions for that
could modify the existing bungee exp
do placeholderAPI works in 1.19.1?
Yes
is ther a placeholder that formats a number as KMBT for thousands,millions ect?
what?
No. But you can make one with the JavaScript expansion. As a matter of fact, there is already one made by the community with all the steps to get it working and all that stuff. All you have to do is copy the steps.
I am confused. Make PlaceholderAPI version specific? or what? I didn't read the conversation above the ping lmao
You mean add a version check?
for the tps stuff?
and only enable it on supported versions?
Basically, though on 1.17+ the class and method for tps should be the same judging by the code
Much appreciated, thank you
pls
my 1.19 placeholderapi some times not start when server started
and i should reload plugin for registring extentions . and bungeecord extention not works well
:(
Provide start-up log then
how do i retrieve if a particular proxy/server is whitelisted
Yo guys
U know a placeholder that show another team member (instead of me)?
His name and health
Someone can help me?
ParseOther?
Hi guys,
Stupid question here: /papi parse --null %bungee_survival_new% it should show the amount of people, but it comes back with 0. On all my other servers this is working without any issues.
Yo guys, Im trying to get my team mate health and i dont know how to do it, someone can help me?
I'm currently having an issue where placeholders load on startup but fail to work in all aspects (scoreboard, tablist, chat) unless a /papi reload is sent after a restart anyone able to help me with this? also version is 2.11.2 running Purpur 1.19.2 Please ping me on reply thanks
somebody knows what placeholder i have to use to do a timer?
Recently I added the placeholder for claims to the tab, but it isn’t syncing to how many the user actually has
somebody knows what placeholder i have to use to do a timer?
this is kinda what's happening with mine rn
a timer? Like tell it a date and it will tell you how much time until that date?
then you can use the server_countdown placeholder
oh. you'll most likely have to look for a plugin for that
doubt there's just an expansion for it
you have duplicate Bungee expansions
like %statistic_time_played% but not
u know some plugin that can do that?
I'm afraid I don't.
thank you ♥
one google gave me this tho. idk how good it is but you can try it out. https://www.spigotmc.org/resources/timers-full-customisable-1-8-1-18.80453/
what?
Recently I added the placeholder for claims to the tab, but it isn’t syncing to how many the user actually has
wrong reply lmao
@sacred dew this was for you
If you test the placeholder using /papi parse
does it sync there?
this plugin havent placeholders, right?
this plugin havent placeholders, right?
by the looks of it, no.
but might be worth contacting the developer and asking for the specific feature
I am using a host that when the server is offline it shows a message "SERVER OFFLINE CONNECT SERVER AT <LINK>"
That makes the PAPI Pinger expansion get confused and say that the server is online and when trying to connect the command explodes
How can I solve that?
Cant really be solved @upper oxide
Oh
F
Is there any similar expansion that can check if the server is working or not?
on the git hub theres a thing that says request to add place holders where would i do that
I'm pretty sure if it says that, the server is not actually offline and something is still running in the back.
are there plugins that show the /baltop?
any economy plugin
hello, my javascript placeholders doesn't work with --null parse. Is there something i need to do to work or is it impossible?
/papi parse me %oraxen_{luckperms_primary_group_name}_tag%
/papi parse me %luckperms_primary_group_name%
/papi parse me %oraxen_god_tag%
I have nested placeholders
does anyone know how i set a limit as to how many decimals the border placeholder can have?
https://cdn.discordapp.com/attachments/498881394575933460/1014252791469965453/unknown.png
Essentials placeholders arent showing the top baltop player (the owner which is me) but instead is showing the 2nd top (a default member)
i have the baltop exception permission set to false so i dont get excluded
you have the expansion?
"/papi ecloud download Essentials"
"/papi reload"
?
oh no, the xpansion doen's work for that
XD
[10:01:32] [placeholderapi-io-#1/INFO]: Successfully downloaded expansion Essentials [1.5.1] to file: Expansion-essentials.jar
[10:01:32] [placeholderapi-io-#1/INFO]: Make sure to type /papi reload to enable your new expansion!
[10:01:32] [placeholderapi-io-#1/INFO]: [PlaceholderAPI] Fetching available expansion information...
>papi reload
[10:01:35] [Server thread/INFO]: [PlaceholderAPI] Placeholder expansion registration initializing...
[10:01:35] [Server thread/INFO]: [PlaceholderAPI] Fetching available expansion information...
[10:01:43] [Server thread/ERROR]: [PlaceholderAPI] Failed to load class files of expansion.
java.util.concurrent.CompletionException: java.lang.NoClassDefFoundError: com/artemis/the/gr8/lib/kyori/adventure/text/TextComponent
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[?:?]
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760) ~[?:?]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?]
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?]
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?]
Caused by: java.lang.NoClassDefFoundError: com/artemis/the/gr8/lib/kyori/adventure/text/TextComponent
at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:?]
at java.lang.Class.privateGetDeclaredMethods(Class.java:3402) ~[?:?]
at java.lang.Class.getDeclaredMethods(Class.java:2504) ~[?:?]```
alright so, essentials expansion doesn't want to install, this issue has never happened to me before, I recently moved to 1.19 is this the problem?
hmmmm the placeholders of baltop are no registred??
Make sure you have vault expansion installed as well
now i see the problem, the rank start by "0", so, you Rank #1 is "%essentials_baltop_player_0%"
try download the "Formatted" expansion "/papi ecloud download Formatter" then "/papi reload"
the placeholder will look like
%formatter_text_substring_:5_{placeholder}%
That error is caused by a version mismatch with PlayerStats (or not having PlayerStats at all). If you download PlayerStats v1.7 it should work!
Finding a Java dev who can create Minecraft plugins
We will pay for 1 plugin
Mean if you make 20 plugin we will pay you for all
Thank you!
And what's the problem? The channel is made for these requests
hey
in deluxemenus 1.10.5
https://i.imgur.com/ka1nuvt.png
the colour codes isnt working for me
oh nvm i just updated to latest and it worked in 1.8.8
why you on 1.8.8 💀
yes. bcz it was relying on PAPI for that and papi removed color parsing.
so you'll either have to upgrade your server version or downgrade your PAPI version. Either that or you can use the section symbols
instead
How do I make a KDR placeholder?
Is there already something that can do this without installing an extra plugin
hmm yea
use the papi expansion "statistic"
the placeholders are:
Kills=
%statistic_player_kills%Deaths=%statistic_deaths%
Yeah but how do I get KDR from that.
kill death ratio
dividing it doesn't work because if the player has no kills or death, it just errors out
hmmm
i have no idia, just using PAPI idk if it posibble
this must be possible, pls!!! doit possible!!! xD
%math_{changeoutput_equals_input:{statistic_player_kills}_matcher:0_ifmatch:1_else:{statistic_player_kills}}/{changeoutput_equals_input:{statistic_deaths}_matcher:0_ifmatch:1_else:{statistic_deaths}}%
maybe you need to use the javascrip expansio to do some like that?
but i can't help, i don't know javascrip :3
Whats an easy way i can use papi to store player meta, so i could execute a command like /setplayermeta {string} so when i parse %examplemeta% as the user it returns {string}
is there something like an extension i can use to make it really simple to set up?
use the javascript expansion. the script should be pretty simple. something like this should work:
function calculate() {
var kills = parseInt("%statistic_player_kills%");
var deaths = parseInt("%statistic_deaths%");
if (deaths == 0) return kills;
return kills/deaths;
}
calculate();```
The javascript expansion has "data". You can basically store, update and get some simple data. But when I last used it, it was pretty buggy and sometimes the data would randomly get erased as well.
You also update the data using placeholders not commands.
You can find the script and installation steps here: https://github.com/PlaceholderAPI/Javascript-Expansion/wiki/Community-Scripts#data
Okay tyy!
thanks so I just use %javascript_calculate% as the holder?
you first have to do couple more things. go to plugins/PlaceholderAPI/javascript_placeholders.yml and add yml calculate: file: calculate.js then do a reload (/papi reload) and go to plugins/PlaceholderAPI/javascripts/calculate.js and add the code I gave you above in there. After that you do another /papi reload and you'll be able to use %javascript_calculate%
if you use mycommands you also can use /mycmd-playerdata add %player_name% <string> <value>
thanks blitz, and if I want to do player + mob kills it would be
function kdr() {
var kills = parseInt("%statistic_player_kills%" + "%statistic_mob_kills%");
var deaths = parseInt("%statistic_deaths%");
if (deaths == 0) return kills;
return kills/deaths;
}
kdr();
right?
no
if you have 5 player kills and 2 mob kills
that will say you have 52 kills in total
function kdr() {
var kills = parseInt("%statistic_player_kills%") + parseInt("%statistic_mob_kills%");
var deaths = parseInt("%statistic_deaths%");
if (deaths == 0) return kills;
return kills/deaths;
}
kdr();```
How I can check if a bungeecord proxy server is online?
I was using Pinger but after I setup firewall for the ports to be secured it now shows offline even if they are online.
hi, none of my placeholders are loading on my 1.17 server, i get this error in console: https://paste.helpch.at/qoqirekire.sql
and this is what i see when i talk in chat: https://gyazo.com/0d5a76095db1cfe704602cb0e1b8ce0c
did that
it all works APART FROM
it seems to be the essentials expansion that is causing it to stop working?
i delete them all, reload, then add them all back with /papi ecloud download player, vault, server, etc which all worked then it all broke again when i added the essentials one
make sure you're using the latest version of EssentialsX
.
combo = ((tokens * 1000000)/40).toFixed(0);
return (tokens + combo).toFixed(0);
}```
sorry my ignorance, but how can I sum two numbers?
it's returning that
Combo is same tokens amount
but I want to multiply it x2 depending on their combo level
so if they've combo level 50, it will give a half of tokens amount
if they've 100 combo level, it will give the same combo amount + tokens
remove the toFixed here
I mean that you're multiplying tokens and assigning it to combo
instead of multiplying combo and assigning to combo
combo = ((tokens * 1000000)/40).toFixed(0);
-> combo = ((combo * 1000000)/40)
oh yeah you're right
thanks @junior musk!
Why is showing 10001000 instead of 2000?
}```
show the new script
can't get that sorry to bother you
you didn't parseInt
on var?
could work
though I'm not sure if strings would work correctly with this line combo = (gems / 100) * 100;
but if it works then all good
yeah that lines works well
👍
worked doing parseint on var, thanks again!
Hey again, anyone knows how to avoid printing scientific notation on javascript?
var charity = parseInt("%tokens_Charity_level%");
return (30000000000000000000 * charity);
}
charity();```
this one shows 1.5e+21
(charity can be only 1-100)
I don't know why yiu would use numbers so big but alright I guess, have fun https://stackoverflow.com/a/1685917
prison op economy
yeah but like, why wouldn't you want it to show as +e?
it's so long
not even the chat could have it on one line
yeah but I use numberSuffix to make it like 3S
alright
wait actually
I think it should work even with the scientific notation
well, idk how your number suffix is done
and does it not work with scientific notations?
yeah, as I thought
oh
right
wait did you try?
maybe it could work even though I doubt it x)
what about 1.5e+21?
yeah same
How can I reset the data of a PlaceHolder to 0?
That will differ from placeholder to placeholder. It's not something related to PAPI tho. PAPI Is just a bridge between the data, and the place you want to display it in
for example, the statistic expansion just takes data offered by spigot from world/stats/ and world/playerdata
there's plugins out there that store data inside a mysql database for example and have placeholders that display that data
you'd have to remove the data from the database
.
u mean proxy server
Yes proxy server
I am pretty sure this error is purpur related and was fixed in 1.19.2 or something like that
Info gotten from here: https://github.com/PlaceholderAPI/PlaceholderAPI/issues/868
Hey, anyone could help me with that, please? Thanks!
tanguygab gave you a stackoverflow link witha method
that is supposed to do exactly that
well help you do it
there isn't a method to avoid using this stackoverflow method right?
1 sec. found something more
perf ty!
function charity() {
var charity = parseInt("%tokens_Charity_level%");
return (30000000000000000000 * charity).toLocaleString('fullwide', {useGrouping:false});
}
charity();```
try this @deep hollow
can't confirm it will work but worth a try
Only thing to note about this method, is that it rounds after 16 decimals
so if the number is 0.586084736227728377283728272309128120398 it will become 0.5860847362277284
yeah with papi reload
ok this way is bad
it wasn't rounding just the decimals
it is rounding any number bigger than 16 digits
1241552951346262351532583285.25 becomes 1241552951346262300000000000