#placeholder-api
150650 messages · Page 84 of 151
you can't return value if loadUser is asynchronous
it is
is it async?
right
then you can't return value like that because loadUser is actually evaluated lazily
i have no idea what you mean...
@Override
public String onPlaceholderRequest(Player player, String identifier) {
if (player == null) {
return "";
}
if (identifier.equalsIgnoreCase("ecoWezHajs")) {
return String.valueOf(MyRegisteredUserDatabase.userCache.get(player.getUniqueId()).getBalance());
}
return "";
}``` i will changed it
wait a sec please
did it work or nah
please send a screenshot of the output.
xD
nice
but i assume data is fetched from database?
if you fetch data from remote database like that, people can abuse placeholder to lag server
you can cache player's balance in ConcurrentHashMap and then returns value
if you only use local database that shouldn't be a problem though
good
thanks for help guys btw
i have a problem with vault 🙂
is there anyone there can help
i cant get my Vault_rank to work, it will just show up on my simplescore(scoreboard)
hello, is everything right here https://paste.helpch.at/etipabitek.js because I think sometines the placeholder is not updating and also Im not 100% sure for the PlaceholderAPI.setPlaceholders line (pls ping me)
How do I make bungee work
I am using it on holos
And placeholders work but bungee does not
just shows %bungee_LobbyProxy%
I think bungee expansion is broken atm
but somebody might be working on a pr to fix it
Okay thanks
Does someone know why my placeholder only updates when a player joins
I am using onRequest method
Hello!
Is it possible to edit the format of %player_first_join_date%?
not exactly. you can either edit the expansion itself (the code) or you can use something like the javascript expansion and manually change it. again both require some coding knowledge. either java or javascript
Ah!
It seemed to me that at one point you could directly edit the format from the config.yml :/
I may be wrong after x)
ok I was wrong @jaunty stag. you can actually edit it from plugins/PlaceholderAPI/config.yml
it will edit a lot of other placeholders that have date format as output
but it works
the option should be called just date_format:
i don't see anything for that, that's why i asked x)
try adding it yourself. the default is date_format: "MM/dd/yy HH:mm:ss" I believe. it should be at the same level as expansion:
Version of Player expansion:
its not going to be under the player expansion
its a global setting that all expansions can use
expansions:
date_format: "dd/MM/yy"
Correct?
Hey all
/papi parse me %statistic_craft_item:potion% gives me an answer; 0 but it is incorrect.
/papi parse me %statistic_use_item:potion% gives me an answer; and it is correct.
Anyone have an idea how to display how many potions have been crafted/brewed? I've read back in history a bit and seem to see that Spigot may not keep track of specific potion types, but would have expected the craft_item:potion to have worked.
I think craft is only meant for actually crafting. not brewing. and not sure that's really spigot but rather minecraft not keeping track.
I was thinking the same. Darn.
there's a statistic that keeps track how many times you interacted with a brewing stand. but not necesarely making a potion
If there is a papi statistic listed, such as %statistic_treasure_fished%, which no longer appears in the paper doc, whom might I take that up with either to get it back or to get it removed?
hi what r the placeholders for number of deaths by a players and kills
you can't get deaths by just players but you can get number of players someone killed
%statistic_player_kills%
and there's %statistic_deaths% but it will show all deaths
why %essentials_homes_set% is not working?
thx
Could someone explain me a little better how does %player_armor_chestplate_data% work? it always return 0
what value are you trying to get?
🕵️
do you mean... chestplate?
yeah.. chestplate
Yes I do, but no matter what it returns 0, I'm trying to get a player's equipped armor
Ohh.. I want to return the whole item, material & enchantments, how that could be done?
you cant
lol
probably easier to get each part individually tho, idk what you want all the info for
but then again that's why I added the feature 😂 🤷♂️
and how would I do that?
like mainly I wanna get the material so I can use it in a GUI
%checkitem_getinfo:38_mat:% using checkitem
ohhh, finally... thanks
Hi, I would like to use sign link to show on a sign how many players are online on my server, I already downloaded several placeholders but I can't figure it out.. can someone help me please
%server_online%?
Yes thanks that works, do you happen to know how I can make scores appear on signs from the scoreboard
not loaded vault https://paste.helpch.at/zakutufino
send the satrtup log @wheat lantern
Hello
So i run a towny server , but they stop towny Papis . Does anyone know where i can get some Papis for towny that include data such as the balance of the town and ect
as tonwy chat does not offer that
ChangeOutput
For the changeoutput placeholder, I'm trying to check a player's helmet, and if its a Diamond Helmet, but the Diamond Helmet has an underscore between it and it interferes with the placeholder, how would I fix this?
%changeoutput_equals_{checkitem_getinfo:39_mat:}_DIAMOND_HELMET_<output-if-matched>_<output-if-not-matched>%
u can escape underscores with \_
alright thanks
Hey guys, I'm trying to get CheckItem_enchantments to work, I need to check if a player has efficiency on an item with the enchantment level. I've tried %checkitem_enchantments:1;minecraft:efficiency% but it doesn't work. Does anybody know what I'm doing wrong?
Is there a placeholder that checks if a scoreboard is currently active or that outputs the currently active scoreboard?
Probably not
Checkitem_enchantments:efficiency=1
Try that
Use the percent signs around it
Hi
I would like to know if the plugin should work in it's latest version even if the server is on 1.16.5
I'm trying to use it for the AnimatedScoreboard plugin but it doesn't work
the plugin itself will work from 1.8.8 to 1.18.2
now if the expansions don't work that's another story
Then it must be the other plugin the one which has the problem
send a startup log here. maybe we can get some information from there
also have you downloaded the expansions you actually want to use in animated scoreboard?
I already solved the problem. I didn't know I had to install the Placeholder pack
Thanks!
I didn't know about that because other plugins include their own placeholders, so I hadn't had to use this plugin
yeah. PlaceholderAPI Is a bit different. its meant to be a bridge between plugins
so other plugins make their own expansions/packs and then those can be used in plugins that support PlaceholderAPI
hi what is placeholder for death and kils ?
%statistic_deaths%
%statistic_player_kills%
Is there anyway to see a list of all of the placeholders?
=links placeholderapi
placeholder list above ^
its not all but its a lot
if its not there, look on the plugin's spigot page you want the placeholders from
I only need basic ones such as players online, health, etc
yeah then you'll find them there
if they're from expansions that do not require plugins
like Player, Statistic
etc
what plugin need for this?
PlaceholderAPI
/papi reload```
and the statistic expansion
Which expansions do you recommend me to download?
u only need to download the ones u need
so if u want these, probably the Player and Server expansion
ok thanks
I have been looking for a while but Idk if there is a balance placeholder that refers to the money
oh
I looked on the EssentialsX paragraph, but didn't think of Vault
@warm topaz thanks worked perfectly
Hi guys, I'm getting a "failed to load class files of expansions" error and none of the placeholders are working in game. I tried updating to the dev version to see if maybe it was a bug but that hasn't resolved it. Any advice appreciated.
Paste of the error: https://paste.helpch.at/gagawozabo
The papi dump command output: https://paste.helpch.at/cogijobewa
is there a placeholder to round up my %vault_eco_balance% from showing 1000000 to just 1.0m
%vault_eco_balance_formatted% I believe
that doesnt work :/ it just displays it as 1000000.0
ugh. that's not what its supposed to show?
the entire balance line shows like this ||" &f▐ &2Balance&7: &a%vault_eco_balance_formatted%"||
oops didnt mean to hide it lol
that states 1m
yep then the placeholder works. make sure wherever you put it has reloaded
maybe even restart the server
I'm thinking you've changed the config but the plugin didn't update
its a pain as i restarted and saved the server and still shows it
not really sure what to tell you. where are you using the placeholder?
is it a scoreboard or?
bcz as you can see it clearly works with /papi parse which means the placeholder works as it should
yeah its in a scoreboard this is the entire code from the scoreboard
put it in a paste bin:
# Only players with tab.scoreboard.admin can see this scoreboard, others will see scoreboard1 are you sure you're actually seeing the admin scoreboard?
im pretty sure? im using TAB
if you put something after it. like random text HELLO or something and reload
does it change?
yeah im viewing the admin scoreboard
if i do /tab announce scoreboard admin [time] then i get to view it for a set time and it didnt change but i tried the other scoreboard and its set to default
so you see the admin scoreboard but if you put HELLO on a line it doesn't actually show ingame?
even after you restart?
it does show i meant it didn't change my scoreboard to another one so i must be viewing the admin one
hmm. this is very strange. since the placeholder shows the correct thing when you use /papi parse me it should show it inside the tab as well afaik
its so confusing as to why it's doing this as well it makes no sense
I'd say go ask in TAB's discord but idk they might just send you back
most probably i know at the top of each segment it has a guide and this is the scoreboard guide but i can't see anything
That worked, thanks alot!
i fixed the issue it was because i bought an ip but never updated filezilla to do the changes on to the server! thank you for the help
no problem
nice
I have deluxehubs installed. What are the placeholders for showing the uptime of a realm and how many players are on that realm currently and to make it refresh every second.
hey! can someone please help me, I get this error in the console https://paste.helpch.at/mewalihono.sql
https://paste.helpch.at/kiqofezira.js here is my players placeholder
Is there a papi extension that allows me to see if the player has an unfinished stack?
Cause I'm trying to give a player an item by checking if they have space in their inventory so I need to check if they already have an unfinished stack of the item I'm giving
hiya i'd like an ecloud account so i can upload an expansion (not immediately if that makes a difference) and apparently i need to ask here? i'd appreciate being dm'd or pinged if/when i get a response :)
possibly caps sensitive if not just download it from the website rather than the ecloud
%statistic_player_kills%
https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Placeholders#statistic
its show this
/papi ecloud download Statistic /papi reload
can I send in dms?
how about KOTH like the most player capturing koth
that;s something you need to ask the KOTH Plugin author
its only show armour stand afterim type those
Did you download Statistic?
Send an image through on https://imgur.com/upload
2
like i wanna do npc with most kills
example username - kills
well then the problem is not the placeholder my friend. it clearly works from what you;ve seen in /papi parse. its either that the npc/hologram plugin you;re using is not working or you didn't set it up
correctly
i cant seem to download any extentions?
i have them in the extentions folder, but when i go into the game and check it says i have no extentions downloaded
do /papi dump and send the link to the website it gives you here
i just reinstalled placeholder and it worked, idk, was weird
cute pfp
send a startup log please
The plugin is extremly slow
(i think)
some now work
but tps dropped
ALOT
the moment they worked
Well
the placeholders work now
they loaded after several minutes
Is it possible that placeholderapi drops my server tps?
yes it is possible. if placeholders do a lot of stuff in the background. now are they the reason your server is lagging rn? idk
1 of my placeholders is malfunctioning
coudl that be?
look the scoreboard
its the tps one
(now tps is back up tho)
i have &e infront of it
hello, what might be the reason for that placeholders not working? (on the papi list there is written that dragonslayer placeholder hooks are active)
oh i cant send photo here...
try the placveholder using /papi parse me
oh.. with /papi parse me command it works fine but with HolographicDisplays it doesnt - can you possibly tell me what might be the reason of that?
they're stored in the world directory
you'd have to delete them from there
iirc they're in world/stats/user-uuid.json
or something like that
might be in playerdat as well
ok thx
Why a lot votingplugin placeholders didn't work ?
+1 also just wasted time to figure out if it supports velocity as well and velocity users most likely gonna out number bungee users in the future anyways
Well I believe ATM bungee is broken
or maybe just broken on newer versions? 🤷♂️ somebody was gonna pr it
But also, there's a lot more people that would know about looking for bungee vs looking for proxy
bungee works tho?
🤷♂️
may just at an alias or some reference in the wiki
I just use bungee for Velocity and it works atm
may i ask why are all the players names on my server red and how do i change this?
Bungee broken, hmm may I should test later if the numbers are correct it outputs 😄
Gonna add that to todo list
Related to papi?
maybe im not certain as normally it would be white correct to im assuming theres a placeholder somewhere
but im unable to figure out where
i figured it out never mind
I cant get the vault working, says failed to register. What do I do?
?paste
Is there a papi extension that allows me to see if the player has an unfinished stack?
Cause I'm trying to give a player an item by checking if they have space in their inventory so I need to check if they already have an unfinished stack of the item I'm giving
Sadly not
Only if inventory is full you can check
if a slot is opened
The Vault placeholder isn't listing any numbers
its just 0
and when i try to a list a player it nothing
in hologram
i did download the vault placeholder
Did u reload the plugin
Also maybe those placeholders dont work idk
See if any vault placeholder works
The placeholder u want works
?
If so, then ur hologram plugin doesnt support papi probably
I reccomend u use DecentHolograms
im using it
DecentHolograms v2.3.1
is ExcellentCrates a valid papi ext
If you were sorry you wouldn't have done it in the first place because you read the #rules
Hello, the BedwarsRelStats ecloud is no longer available?
How do i make my own values for kills and such? I got no clue how this works and where i should put the values at.
wym "make your own values" @wintry ibex ?
Do you just want to get the player's kills and such?
Sure, do you know what is the issue with this vault
yes player kills or blocks mined
Hi, I would like to use a Placeholder that says how many kills you have made in an specific world. Will the battlelevels expansion work for me?
is ExcellentCrates a valid papi ext
Hey. So I am using the %server_tps% placeholder and it works. But it displays "20.0, 20.0, 20.0" when I just want it to show one value. How can I do this?
%server_tps_5%
i think
if not use Spark's TPS placeholder
which i recommend using
Won't that show TPS from 5 minutes ago?
5 seconds i think no 5mins
ill double check
gimme a sec
try %server_tps_1%
but i would heavily recommend using Spark TPS placeholders
%spark_tps_5s%
that doesn't even work at all
that works thanks
Anyone can help me please
I found the KillStats extension but idk if I have to download something to show the kills of an specific world
is ExcellentCrates a valid papi expansion
in papi config.yml should it look like this to change how %essentials_afk% looks?
essentials:
afk:
yes: '&0&l[&4AFK&0&l]'
no: ''
[09:13:24] [Server thread/WARN]: [PlaceholderAPI] [math] Placeholder: %math_0:_{luckperms_meta_totalcaught_anchovy}+1%
[09:13:24] [Server thread/WARN]: [PlaceholderAPI] [math] '1+1' is not a valid Math Expression.```
It works the first time, it goes from 0 to 1. But on the second time, I get this error '1+1 isn't a valid math expression'. Any ideas? Thanks!```
So for some of my placeholders i jus tupdated my server to 1.18.2 it doesnt work for some of them
try putting math_0:1_ instead?
instead of just 0:
This is still saying invalid placeholder and the same error :/
Perhaps find another way to set the user meta instead of through permissions?
Hi
[04:16:16 INFO]: RedrDev issued server command: /ajlb add %aparkour_top_name_redrdev% [04:16:16 WARN]: Exception in thread "Craft Scheduler Thread - 9" [04:16:16 WARN]: org.apache.commons.lang.UnhandledException: Plugin ajLeaderboards v2.4.3 generated an exception while executing task 9858
/ajlb add %aparkour_top_name_redrdev%
ajLeaderboards and Aparkour
Should be more to it.
and placeholders https://prnt.sc/GlFbMrGJLg3E
Report it to the dev. at me.davidml16.aparkour.placeholders.PlaceholderHook.onRequest(PlaceholderHook.java:114)
how to report?
would that be possible?
Post a message on their discussion page
what do you mean by that?
your current system seems pretty hacky
you're setting user meta then using math placeholders to increment it every time the player catches a fish right?
Yeah basically just trying to keep a stat for each player so they know the total fish they catch of each type
And the plugin has a feature to execute commands when they catch a fish, and this way was the only way I knew how to do it
perhaps commission a custom plugin to help handle that data?
Wouldn't really take more than an hour's worth of work I'd say, and you can use it for multiple things
Or if you have MyCommand you might be able to do that already I think
ok thanks Maroon and cj ill look at both those things 🙂
no its a fishing plugin called PyroFishing that runs a command when a fish is caught\
oh lol
maybe see if this still works? https://www.spigotmc.org/resources/playerstats.11555/
meta isn't too bad if you're not tracking a bunch of stuff
even then, still meh
pretty good way of doing it I think
Its working again now that I removed the &f colour - but is LuckPerms meta not a reliable option?
it's reliable
just not the most ideal storage option of stats like this
having a custom plugin, or something like playerstats, would provide more benefit of how you could use it
you could use something like topper though to create a leaderboard from the meta value
which could be nice if you wanted
Right ok, just a bit worried about that plugin above as its so outdated. Whats topper?
Thanks Barry
I only have a small server so would that mean id be more likely to be ok with LuckPerms meta? Because I cant find an up to date similar plugin like PlayerStats after a quick look
ya, it's 100% fine to use
it's just player meta
deluxemenus also provides placeholders/actions for it
so basically the data itself gets stored to the player's .dat file
inaccessible when the user is offline
probably the only downside
ok cool, thanks for the info and fixing my math expression 👍
I like these kind of setups
Sorry for bugging but anyone?
How to solve this, I download the placeholder, and writes Failed to find an expansion named: Server, I registered the command / papi ecloud download Server
Hello !
Do you know a placeholder that allows to know how many times a player has connected to the server?
the statistics expansion might have it
i just found the playtime expansion, looks like it has one
Uh, what xD, it's bug
check /papi ecloud download PlayTime and %playtime_timesjoined%
No extensions with this name :/
Ah!
I'm not going to install a playtime plugin when I already use CMI :/
@final shadow
Sorry Barry :x
bruh c'mon
should be sorry for clip 😭
update the server expansion
that's not a bug
its telling you that Statistic doesn't exit
and to look at that link to find what actual statistic are available
Hmm, why does it offer me this in autocomplete and on the ecloud?
well the autocomplete just comes from the ecloud. so I guess someone listed it on the ecloud for some reason. let me double check. maybe its not a spigot statistic but an internal one.
or maybe it wasn't there in 1.17.1
👀
its not on 1.12.2, 1.17.1 and 1.18.2
and its not a Statistic placeholder at all. just checked the code
so someone either listed it by accident, or it used to be a placeholder and it got removed but they didn't unlist it at the time
so yeah @jaunty stag I'll be removing it from the ecloud but I'm afraid that's not a placeholder in the Statistic expansion
only one I can find is from the Statz plugin but from what I know that plugin is not maintained anymore, their expansion is broken and also their statistics only start counting from when you've installed the plugin so older statistic don't count
Is excellentcrates a valid expansion
it comes with the plugin I believe
It says they have papi and internal placeholders
That counts as a ping
but that's what I said as well? it comes with the plugin. you don't have to download it from the ecloud
how to get ListPlayers on ecloud? "Failed to find an expansion named: ListPlayers"
in placeholderapi
@idle tundra ^^^
@turbid tide why it doesn't work in chestcommands?
what doesn't exactly?
the ListPlayers expansion is old, unmaintained and broken
if that's what you're asking
:/ i must have it
it works with worlds player list?
Someone know why when i restart my server the papi expansions stop working? i need to re-download them and then reload the plugin everytime
Is there any error on startup?
java.util.concurrent.CompletionException: java.lang.NoClassDefFoundError: com/palmergames/bukkit/TownyChat/events/AsyncChatHookEvent
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314) ~[?:?]
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1766) ~[?:?]
at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: java.lang.NoClassDefFoundError: com/palmergames/bukkit/TownyChat/events/AsyncChatHookEvent
at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:?]
at java.lang.Class.privateGetDeclaredMethods(Class.java:3334) ~[?:?]
at java.lang.Class.getDeclaredMethods(Class.java:2446) ~[?:?]
at me.clip.placeholderapi.expansion.manager.LocalExpansionManager.lambda$findExpansionInFile$7(LocalExpansionManager.java:396) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1764) ~[?:?]
... 1 more
Caused by: java.lang.ClassNotFoundException: com.palmergames.bukkit.TownyChat.events.AsyncChatHookEvent
at java.net.URLClassLoader.findClass(URLClassLoader.java:433) ~[?:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:586) ~[?:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:519) ~[?:?]
at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:?]
at java.lang.Class.privateGetDeclaredMethods(Class.java:3334) ~[?:?]
at java.lang.Class.getDeclaredMethods(Class.java:2446) ~[?:?]
at me.clip.placeholderapi.expansion.manager.LocalExpansionManager.lambda$findExpansionInFile$7(LocalExpansionManager.java:396) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1764) ~[?:?]
... 1 more ```
your TownyChat expansion is messed up
But i dont have TownyChat
do you have the expansion?
Yes, i remember i download TownyChat expansion to use Towny placeholders
Thanks, i was using TownyChat placeholder, but i didnt need them.
Hello I'm trying to get the placeholder for the latest player (the newest player to join the server) which returns the username
I could not find the description of each placeholder on the wiki
Does anyone know what that is?
Nevermind I found another way
[13:16:58 WARN]: [PlaceholderAPI] Loaded class com.bencodez.votingplugin.VotingPluginMain from VotingPlugin v6.9 which is not a depend or softdepend of this plugin.
theres a few of these in my console for didfferent plugins, does it matter and how do i make it so it doesnt show the warn
It can be safely ignored, if it really bothers you can add each plugin to placeholderapi's plugin.yml as a soft depend
where do i see the plugin.yml
its not just papi either, fawe and vault are giving me them
That warning is dumb. It comes up even if a plugin depends/soft-depends on another.
you have to open the PAPI jar and edit the file inside there.
its not really something you'd want to do. if you do, you'll have to change it every time there's an update in PAPI.
Heyo, I've come to ask a question xD
I've got a lil system going here where a plugin modifies luckperms meta in a numerical matter, aka setting kills+1 on each kill. Now I'd like to see if there is some type of leaderboard expansion that can output to me the playername of whoever has the highest value on that meta which would be %luckperms_meta_kills%. Any ideas, leads?
I'll give that a shot, thanks
hm yea no lol
Ajleaderboards should be perfect for your case. What have you tried so far?
we figured it out in dm
With tanguys help I figured out that the issue was op bypass lol
Thanks for the response though ;) I guess I had a brain fart haha
Hello, by some reason since a few weeks ago javascript placeholders keep spamming errors on the console, dunno the reason, here's the log: https://paste.ee/p/UE6fN
hey i'm having trouble with deluxetags
you are most likely using the placeholder in a place where a reference to an online player isn't passed to the expansion, and the variable BukkitPlayer is not defined
this is one of the placeholders that is giving error for example
`var placeholder = "luckperms_prefix";
var parsed = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%" + placeholder + "%");
function clanTag(){
if(parsed != ""){
return parsed;
}
return "&7Usuari";
}
clanTag();
`
oh, sorry
if you put a %player_name% in the place where this js placeholder is used, does it display your name?
Is it possible to use placeholderapi in resource pack?
no?
oh, so you're meaning to remove the BukkitPlayer from the code right? sorry, I dunno js, I just copied the code from another placeholder that used the player name
I'm having issues with certain expansions. I have jetsprisonmines downloaded through the ecloud expansion, and when parsing the placeholders, they don't output anything. Other placeholders are working but some like from Player as well aren't outputting. Any idea on what may be the issue?
My placeholder %statz_distance_traveled_SURVIVAL% (SURVIVAL is mv name of world) didnt work in my scoreboard
Im using plugins: Placeholder api, statz, statistic.
but still it didnt work. I want to sent you screenshot but its not possible here 😦
https://paste.helpch.at/nidirivogu.md papi error cant update 2 expanstions
uhm
heya I never got a response and idk if people are still getting to it or if i just got overposted too much, but I've replied to it anyway (sorry if I'm not supposed to've done this!)
@nova sleet send funnycube#0001 an email and username
can't message them; DMs seem to be off for them
no one is replying to my problem too
the bot did? it literally gave you a reason and a solution
didnt worked
I delete the bungee exp and redownloaded it but I still get the update notification and if I run the update command I still get the bungee error
You have to @ him
That's what I did when I wanted to make my account and he just sent a friend request
thanks! @balmy marten
💔
First time using placeholderapi. where can I find a list of expansion?
%math_{mmocore_profession_mining}/5%
is this not the correct format anymore for using math with another placeholder?
the mmocore_profession_mining is an mmocore placeholder
that placeholder is valid when used by itself
yeah its not, try doing %math_0:1_...%
Hell yeah, tier two
@errant iron i added bungeecord expanstions but i added this comong in hologras %bungee_Bedwars% but it is not showing memebers in holograms
@fervent spire
are you using Holographic Extensions
a long list can be found here https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/placeholders but many placeholders are just not listed there. they're listed usually on their plugin's spigot or whatever other website they use page.
well not exactly. %math_{mmocore_profession_mining}/5% should be still valid. the 0:1 options in there are not required. they just specify the decimal amount and the rounding type. they have default values you can set in config.yml.
what does /papi parse me %mmocore_profession_mining return?
first of all test the placeholder using the papi parse command: /papi parse me %bungee_Bedwars% if it returns the correct value then the problem is most likely your hologram plugin. Holographic Extension uses a different format. I believe it would be {papi:bungee_Bedwars}
yes
kk
I want to use the ChangeOutput expansion
but idk how
can someone provide a tutorial or an example for its usage
I went to the wiki but I still dont know how
did you read this? https://github.com/Kqliber/Expansion-ChangeOutput#syntax
iI still dont get it
can u show me an example
returns 1, which is correct
it seems like the {mmocore_profession_mining} placeholder returns Error instead of a number when used in the math expansion.
mmocore gui
what if you put like %player_name% in the same place you put the math placeholder
what does that show?
works, shows my name
the problem seems to be that the plugin I'm using uses {} brackets for their own placeholders
is there any way I can get around using those brackets with math?
ah Ic.
not really
yeah. just checked the code. they replace it with Error. this seems like a problem on their part that they should fix. instead of showing Error, they should leave the text as it was.
yeah makes sense. Thank you
%math_[precision]:[rounding]_<expression>%
%math_0:ceiling_2.5 + 3.2% for example should return 6
the 0 before : means 0 decimals
and ceiling means it will round up the result
so 5.7 will round up to 6
here's all the rounding options https://github.com/Andre601/Math-Expansion/wiki/Config-options#rounding
i don't think it can do what I wanna do, so I want to make this text thingy that shows a player's team: Team: %betterTeams_color%%betterTeams_name%
when the player isn't in a team, that placeholder represents a space, I want it to show None instead
yeah that's possible.
well depends. what does /papi parse me %betterTeams_name% return when you're not in a team?
a space
like nothing
just to be sure. is it space or empty string? try /papi parse me %betterTeams_name%TEST does this return just TEST or TEST?
lemme check
it returns TEST
alright then %changeoutput_equals_{betterTeams_name}__None_Team: {betterTeams_color}{betterTeams_name}%
should be what you need
ty it worked!
@austere hawk so I've looked at the expansion and there's a few changes that you need to make before I'll verify it.
- You should include groovy directly into the expansion.
- You should make it just an expansion. Not a plugin. The ecloud is specifically made for expansions that will directly download into the plugins/PlaceholderAPI/expansions directory.
ping me after you make this changes and update them on the ecloud and I'll verify.
Yoo hello
If there is another plug-in
Am I allowed to make a placeholder for it if I'm not the owner of the plug-in
yeah. at least as far as I'm aware. unless the plugin's developer specifically states otherwise I guess.
Okay
Thank you
now I just need to learn how to
The plug-in itself has placeholders
But I want to use them in other plug-ins hence want to make a papi one
well if the plugin has an API, it might be fairly easy to make a PAPI expansion for that plugin
anyways. here's the wiki explaining how to make an expansion if that's what you don't know https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Hook-into-PlaceholderAPI#first-steps
has any way can i change what is writed on the placeholder? for example when i stay outside of a claim write Unclaimed but i want write PVP ON for example
use the ChangeOutput expansion
i was reading than but i don't understand can you give me an example?
they have like 8 examples on the wiki?
you can read this whole conversation as well if you want
Okay thanks :3
@austere hawk https://github.com/ShimadaJP/Groopi/blob/master/src/main/java/com/github/shimada/groopi/GroopiExpansion.java#L35 is this going to help with anything, more than creating problems?
Also, I'm pretty sure you want to cache all these reflections https://github.com/ShimadaJP/Groopi/blob/master/src/main/java/com/github/shimada/groopi/GroopiExpansion.java#L22-L31
nice
yup
I wonder if the groopi expansion performs any better (or worse) than the JS one? 🤔
It feels like it allows for a lot more but at the same time its kind of limited since it doesn't read from files
so you're just stuck writing code between the two % which sounds super annoying
yeah that will be annoying if you end up writing a lot of code
Yeah but it seems really nice for simple stuff since you can access stuff from other classes more easily as well it seems
with the nashorn engine you can also access other class iirc. with just 1 line of code.
Yeah but how well does it perform? Last time I used JS for anything that wasn't a really small placeholder it messed up the ticks big time
though looking at this I don't think you can actually declare variables or any of that
I mean its groovy. you should be able to declare variables
you'll have to test the performance yourself
from the examples in there it seems to only have one statement, so I'm not too sure
i need help
There is no time to wait! Ask your question @undone path!
{deluxetags_tag} this doesn't work
Hey all, we're writing a short article about PlaceholderAPI and want to inquire about the origins of the plugin. Was it initially released on SpigotMC or was there a former presence on Bukkit[Dev] or any other platform?
in multiverse world how amy player are there what placeholder
Thank you ❤️
Oop ok
- eCloud has file size limit(probably Apache's default 2MB limit). I had to remove groovy from jar file in order to avoid "Too Large Entity" error on the website
- My expansion works as both expansion and plugin
@balmy marten can answer this better than any of us here
I was not aware of the first one. For the second one there's the persist problem. When an expansion works as a plugin it needs to override the persist method and return true
Sure. Is everything fine after fixing that?
i need him to hurry up with cubes ping can’t stay awake forever 😂😭
https://api.extendedclip.com/expansions/groopi/
I fixed that
there's also a few mentions that gaby made above. Might want to check those out. I'll have to check with the admins to make sure that having a plugin-expansion on the ecloud is alright.
Calling GroovyShell by reflection is necessary because I had to download groovy jar file and load that using URLClassLoader to reduce file size(eCloud has file size limit). Calling methods of classes in another class loader is not possible without reflection.
Also, caching Method/Field/Class objects doesn't harm performance that much. I can cache if I wanted, though. Groovy caches some data in their own, so performance shouldn't be a big problem anyway.
I should use a perma link next time, this was pointing to the star import of org.bukkit
I feel like its just there for convenience?
Instead of having to type org.bukkit.x to get to a class in your script, you can just use it directly.
Which I guess shortens the length by a little
I doubt people use classes that much though
JavaScript expansion doesn't work in some environments and Groovy is mucher easier and readable
Yeah but why can it not be just an expansion?
I think he misread lol
What's wrong with being a plugin?
I just made as a plugin and an expansion and I didn't remove the plugin part simply because it doesn't have to be removed?
It doesn't have to exist in the first place haha
Well, I dont have a problem with it being a plugin if you have a reason to do so.
There's totally 0 reason to have the plugin part. I made as an plugin in the first place because it would make debugging easier and I have made a plugin loader which loads groovy script as a plugin before
Why would someone download it from the ecloud and use it as a plugin, when expansions can be changed in a matter of seconds, unlike plugins which require a server restart?
I mean if it brings security concerns or anything I will remove the plugin part
It does not, but it also makes no sense to be a plugin, when all it does is to call #register() onEnable
I place the plugin symlink in plugins directory and every time I build I simply do /reload confirm to reload the expansion
That's how I debug
No, that causes problems. You literally put it on the expansions folder and run /papi reload
Dont get me wrong, I'm glad that someone made an alternative for the JS expansion, I just want to sort some things out before releasing it.
I know reload could cause problems, but I just wanted to debug so that would be fine. Also, I knew /papi reload works too. That's just my preferred way
wouldn't say 'kind of' lmao
Right, then remove the plugin part if it has no use.
sure
I like Groovy more than Kotlin
It's more Java friendly
wtf lol
No is not 🤣
you can directly convert Java to Kotlin quite easily
Groovy is a scripting language essentially
and thank god Gradle has kts lmao
Also, have you done some tests to see how well it performs?
there are more features in Kotlin that can't be used in Java language for example: delegate, lambda with receiver, refined/inline, abstract property...
^^^ this is what I mainly want to know about
so it adds good things to the JVM?
what's your point lmao
Smh Star
Groovy takes things away, it is quite literally a DSL for scripting
so in this case, probably a good thing
You can't mix Java and Kotlin. In other words, You can't use code written in Kotlin in Java
you can't use code written in Groovy in Java???
you can
Groovy property automatically generates getters and setters
just like lombok
and anyways, if Groovy and Java are sooo similar, why not just learn Java and make a plugin lmao
probably much better performance
It just works "fine" but I don't know how much performance you would expect
🥴
let me do more performance tests and remove plugin part
Try to do a benchmark with your current setup, reflections on each onRequest
Sure
does this work on latest? reflections are heavily limited as of Java 16
Plugin users might want to modify String in Java code and if the plugin was written in Groovy plugin users can modify them
I feel like its kind of convenient if you already happen to know Java/Groovy and need to do something funkier than usual with placeholders.
I feel groovy is a "better version" of skript
You probably might want to add file support for it tbh, writing everything between % % is not fun
file support?
I suppose it can have its uses
Hold on, it doesnt have file support?
nope lol
Welp
In my experience at least, I have not needed much complicated placeholder parsing and stuff
yeah like the same way you'd do with the JS expansion. You basically have the script in a file and the expansion would read from that file
I tried to do it before with JS but the performance hit was waaaaaaay too big with the use case I had so I just opted in for a plugin
hmm
I mean yeah, what kinda stuff were you doing?
I'm interested to hear the actual use cases
A gamemode
Cause I barely ever need to like heavily modify placeholders
What exactly in "a gamemode"?
Jk, it was a reference to skript people making entire servers with one skript file xD
I had a custom leveling system and I needed a convenient way to put the levels in a GUI without having to make five billion guis
oh lmao
I can probably get a video I recorded hold on
Well a custom leveling system sounds like you already should've had a plugin for it lmao
No no no its just for the GUI part of it
It depends from person to person, some like to even use it for prefixes. A switch/case for %vault_rank%
The most common use case imo is to change the output of a placeholder
This is the most common one I saw yeah.
well yeah, but we have expansions for that already
Yeah but if the placeholder has multiple outputs, it doesnt work
multiple outputs?
Tbh id rather use %javascript_name% than %changeoutout_equals...%
Possible outputs
my server's performance indicators would rather me not do that lmao
Smh Star
dunno, maybe I'm just too much of a big boy java developer
but I've never had to abuse placeholders like people love to do so much lol
I dont use the expansion, but I used to, and it was handy
I agree, some go over the limit
wait I can't upload videos here :fr:
send youtube link or somethin
I've been scammed, I thought tier 2 let you do that
On offtopic maybe
oh yep
in other words, setup my first reposilite today
so, lots more big boy java developing on the way
Good
reproducible builds without mavenLocal 😌
I have many ideas but not so much free time
I got two months left, and the second is for exams
July to mid oct
I get off July as well yeah
https://imgur.com/a/3NNVosW there we go
er, I suppose end of August
it's supposed to be 3 4-month semesters in a year
Jan-Apr, May-Aug, Sep-Dec
Ah you got trimesters
We have only two here, starting with the next year, grade 12 and below will have 4 "modules"
Which sounds weird, but will see how it goes
Basically it was just one GUI and the name of each item was like %lvl_levelAtSlot_1...9%, and it would calculate the level's actual value depending on your page number. The most intensive part is that the colors of the level were a gradient from green to red, which had to be calculated like 9 times every time you flipped a page (for each item)
oh yeah my middle school and high school had quarters
so like 4 semesters kinda
but not including summer
Something like that I suppose
It has basically no performance impact as a regular plugin, but JS was fucking ripping the server apart
yeah learned the hard way lol
🤣
had a big event a few days ago, 105 players online, they spawned in like 5 ModelEngine mobs and the server TPS goes from 20 to 5 in a matter of seconds
Yeah those should be used very very scarcely.
I guess it depends on how big those 5 mobs were though
very small skeletons
yeah pretty rough
and that's why we're splitting the server into smaller instances!
and having dedicated dungeon instances with ModelEngine stuff and like a 6 player cap
Yeah that's probably the only way to do it at a large scale. has there been any movement lately in the instance splitting tech or are you guys making something from scratch?
I know MultiPaper is pretty cool
last I saw was like a couple paper forks but I've no idea how far they got
Yea that one!
but we're rolling our own thing that just synchronizes player data between servers using a Go service and RabbitMQ
Ooh, fancy
much faster than the first attempt which was a Python service and RabbitMQ lmao
multiple seconds between server jumps with that one
Oh wow MultiPaper came a long way since I last saw it
I did some performance testing.
I placed 300 command blocks that parses the placeholder below every tick
%groopi_ Bukkit.broadcastMessage("Hello, world") %
During all the command block activated, the server had 7 TPS - parsing 300 placeholders took 22ms every tick, meaning that parsing a placeholder takes 0.07 milliseconds.
https://res.cloudinary.com/dmyl8bcix/image/upload/v1651481951/profile_i4nasq.png
This is the profiler view. As you can see in this view, 95% of the execution time is consumed by generating classes with ASM bytecode modification used by Groovy runtime, and 3% is consumed by Constructor#newInstance. At this point, we can ignore reflection overhead.
To prevent generating classes, I have to cache all generated classes in some way. I could use GroovyClassLoader for that purpose, though don't want to implement class caching mechanism by myself. I might implement class caching mechanism in the future.
Also, this expansion works in java17 (I tested in java17)
Updated
I'm gonna try implementing class caching mechanism
Uhh these reflection
I wish eCloud had higher file size limitation
Spigot was it's first release, it was called "Clips PlaceholderAPI" originally before being rebranded to just "PlaceholderAPI"
https://web.archive.org/web/20160818093736/https://www.spigotmc.org/resources/placeholderapi.6245/
Great, thank you so much!
Hi. I'm not sure but I think I have found a memory leak, and at first seems related with EssentialsX (and one of their issues https://github.com/EssentialsX/Essentials/issues/4342) but it's affecting to PAPI when it shouldn't. Any one had any similar problem? Should I report it in github or I'm wrong with it? https://imgur.com/a/WfIjnq3
Turn off the baltop task in the PAPI config. Those placeholders are scheduled for removal.
The latest EssentialsX expansion has its own baltop placeholders now.
yeah. like mentioned above, there's also 2 pinned messages detailing the problem.
https://prnt.sc/g2CydE90WxcB from what plugin (pls ping)
that might just be the progress expansion
What is the option path in config?
Sorry flash, didn't know :(
it should be something like expansions.vault.baltop
Okey, thanks :)
Hey, Why are the values not the same?
https://cdn.discordapp.com/attachments/837196217929826324/970749358662377552/unknown.png
first one is a percentage to next level
second one is how much xp the player needs to reach the next level
he's saying its not the same as the essentialsx output
I didn't notice that at first too
ah
Artsuki has 448,374,493 exp (something 9999), 2727 needed to level up
My french is horrible
tf
yeah I'm not sure lol
%player_current_exp% the solution xD
aw thats funky
nice, always struggle to find that one
you'd think %player_exp% would probably do that
Yeah the naming is pretty bad lol
i believe it's just based off the method names
which are bad
getExp() Gets the players current experience points towards the next level.
yep
lmao
idk it's all weird
yeah should be something like getExpToNextLevel or getExpRemaining
I mean you could probably try deprecating the names and eventually just remove them
you'd replace them with sane ones and just snug all the bad ones to the bottom of the page and say they'll probably not work anymore in the future
tru
also btw
that description
isn't quite accurate either
it's cut off
Gets the players current experience points towards the next level. This is a percentage value. 0 is "no progress" and 1 is "next level".
that's the full description lmao
that's why it shows the .94 whatever
Does it ever reach '1'?
actually
it'd just go back to 0 no?
@lament verge %player_current_exp% is what you want?
or %player_total_exp%
lmao
smh
bro these names :fr:
probably never reaches 1, no
i think current exp is the current xp in the level?
that's not even a method, prob added by us
calculated out
jesus
or maybe its the same as total
sorry for existing, when i do /papi ecloud download skript it says failed to find expansion named:skript but on the website on placeholders it says that exists?
the expansion was unverified as it no longer works. Also please just keep it to one channel.
so i cant use skript placeholders?
Which version is for 1.7.10?
ugh. which version of PAPI? then I believe official support for 1.7.10 was dropped in PAPI 2.10.10. you might still be able to run PAPI latest on 1.7.10 but for a guaranteed working experience then I guess version 2.10.9
or something like that
so i just add this to plugin folder and then how do I use the placeholder?
not the plugins folder
the expansions folder
you can see here how to use it https://github.com/Altruiis/skript-expansion/#skript-expansion
2.10.9 didn't work
did you get any errors or anything?
do i need to restart server or can i just reload papi?
papi reload should be enough
how do I know if it added or not
you can test it. or you can do /papi dump and look at the logs to see if its registered or not
you can try. but are you sure you've placed the expansion in the correct folder?
iirc, it depends on the machine you are hosting
OH
Hey is it posibble to use placeholderapi plugin on bungeecord server?
no
if your motd plugin is a bungeecord plugin you'll need to use whatever placeholders are provided by that plugin
If anyone here is using MyCommand... Is there an option to script a bit with a PAPI placeholder? And if there is, could you please share a example? 🥺
you should be able to just use placeholders like normal in your commands
so %player_name% for example
whats the placeholder for deluxemenus to open a gui?
material: barrier
name: '%translations-cancel%'
action: BACK
thats the current back button
ugh. action: BACK is not a deluxemenus thing tho
there is no internal placeholder showing you what the last menu is either
nor external for that matter
this is from a shops plugin i just need it to open a specific gui from Deluxe menus
there is no back action in deluxemenus and there is no way to tell what the menu you're coming from is.
you can open other menus from inside a menu but you just have no real way to tell what the menu they last opened was
ah sorry ill figure it out it might be the other pl messing up
Haha! This was very helpful! I did something wrong with the symbols haha. Thx again ❤️
Send this to whoever the developer of supremequests is.
So I have moved to 1.17.1
Latest version of FeatherBoard, PlaceholderAPI is 2.10.10.
Got this error:
?paste
If anyone might help about this.
also, if you can send the part of the error right above this
update your Server expansion
Might be from the bungee expansion
/papi ecloud download Server
/papi reload
When fixing Player expansion error?
Im not on pc right now
🥴
There is no time to wait! Ask your question @pliant sigil!
@everyone
The 'everyone' mention is disabled so you can't annoy people.
omg
@pliant sigil Is this related to #placeholder-api in any way? Or any plugins? or HelpChat?
aaand they left
noice