#placeholder-api
1 messages · Page 89 of 1
Parse the placeholder and see what it returns
i sent you a ss
no need, just do what frosty said
how do i parse the placeholder
/papi parse me %autorank_current_rank%
ok
Thank you Kali, on mobile so writing is hard
it just responds with "%autorank_current_rank%" in chat
Are you sure you're using the correct placeholder?
extendedclip.com is more updated than github @brisk coral ?
on website: https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Placeholders#autorank
%autorank_current_rank%
%autorank_next_rank%
%autorank_time_of_player%
%autorank_local_time%
%autorank_local_time_formatted
%autorank_global_time%
%autorank_global_time_formatted%```
i guess that makes sense if so
Ecloud should be latest same as github
so should i change it to %autorank_active_path%
Try, not familiar with the expansion so not sure what that returns
not working
it returns %autorank_active_path%?
hmmm
also returns %autorank_active_path%
Do you have the plugin installed?
And is it loaded properly
yes - no errors
Odd, lemme hop on pc
legend
Expansion-AutoRank.jar is also in the plugins/placeholderAPI/expansions folder
There's actually so many unlisted placeholders in the expansion kek
mhm
sec lemme list them to you
%autorank_total_time_of_player%
%autorank_total_time_of_player_formatted%
%autorank_daily_time_of_player%
%autorank_daily_time_of_player_formatted%
%autorank_weekly_time_of_player%
%autorank_weekly_time_of_player_formatted%
%autorank_monthly_time_of_player%
%autorank_monthly_time_of_player_formatted%
%autorank_local_time%
%autorank_local_time_formatted%
%autorank_global_time%
%autorank_global_time_formatted%
%autorank_completed_paths%
%autorank_active_paths%
%autorank_eligible_paths%
Those are all the placeholders
%autorank_active_paths% tells you all your ranks
I'll update the wiki/gh once I get access, unless someone else can right now cough @vivid sparrow cough
absolute legend @brisk coral
can you add a placeholder for autorank that only shows current rank?
%autorank_active_paths% = shows long list of paths
Those were already added, ask Staartvin to add more things
Don't think he's in this discord no, check spigot
message on spigot or see if he has his own discord server
wtf?
second and third row are not showing properly What should i do?
Settings.yml
1:
interval: 80
liner:
- '&cName:&6 %player_name% '
2:
interval: 80
liner:
- '&cMoney:&6 %vault_eco_balance%'
3:
interval: 80
liner:
- '&cRank: %vault_prefix%'
4:
interval: 80
liner:
- '&cClaim Blocks: &6%griefprevention_remainingclaims%'
5:
interval: 80
liner:
- ''
6:
interval: 5
liner:
- '&4discordlink'
- '&4discordlink'
Not showing properly as in? Also what plugin
scoreboard-revision
I mean yea, which one tho
Does it even support PlaceholderAPI?
whats not showing? the whole line or the placeholder?
whole line
if ur seeing this on the same client version as ur server version, then id recommend speaking to that dev about it as it could be an issue with the plugin itself. ive no experience with the plugin so i couldnt tell u
Q: /papi parse leasoncre %player% should just print my username right? or am i doing it wrong? tried a few other placeholers and they all just print the placehoder w/o parsing it
o.O 👍
Can anyone help with potion data I cant get it to work. What would the data be for potion of swift 3mins?
do you have Essentials ?
yeah
try to do /itemdb while holding the potion
Just says
Item: Potion
then gives lots of "short names" which dont seem to work.
what's you server version ?
paper 1.15
deluxe menus?
Yea 5 digit number
Where can i find them, ive tried googling it
sorry just realised i was in #placeholder-api
If anyone knows how to add potions in deluxe menus @ me in general-plugins.
They know which placeholder is position (x, y), I try to use bannerboard but it doesn't let me select two points
I need support. With luckperms bungeecord. I am using essentials chat {DISPLAYNAME} &f» &7{MESSAGE} that is my chat format and I have a prefix on a group but when I set my self to the group the prefix does not show
=paste
Please use a paste service to share configs, errors, code and long logs.
• HelpChat Paste
whats the error
anyone can give me a hand with https://pastebin.com/muvinJEY
I need support. With luckperms bungeecord. I am using essentials chat {DISPLAYNAME} &f» &7{MESSAGE} that is my chat format and I have a prefix on a group but when I set my self to the group the prefix does not show
@brisk bronze if you have LuckPerms on Bungeecord, you will also need it on Spigot
@wicked chasm what statistic expansion are you using
also what placeholder are you using?
for the cows
make sure you're on the latest version by typing /papi ecloud download statistic and /papi reload
ok
I believe that is what the latest version uses
👍
anyone know if there is a formatted version of %player_total_exp%
I don't think so, you can use javascript for it though
Could u help me with that? (=
Never used javascript before lol
Would just like it to format it the same as the formatted vault eco one
well
you're in luck
I already made it
var lvl = parseInt(args[0]);
function formatNum(num){
if(num>=1000000){
return (num%1000000).toFixed(0)+"m";
}else if(num>=1000){
return (num/1000).toString().match("-?\d+")+"k";
}else{
return num;
}
}
formatNum(lvl);
what u mean
that would make 5000 5k
very possible I made it already
what if they have 50912
I think 51k
hm
nah 50k
would it be possible to add the .91
oh
how would i go about making it the same as the vault eco one
is there a way i can just copy the stuff inside and change what it checks for
a bit
so
I found this online
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}```
so this should work?
var num = parseInt("placeholder_goes_here");
function numberWithCommas(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
formatNum(num);```
ill try it 1sec
okay gimme 1 sec
tyty
ah
so
so easy
var exp = parseInt("50912");
function formatNum(num){
if(num>=1000000){
return (num%1000000).toFixed(2)+"m";
}else if(num>=1000){
return (num/1000).toFixed(2)+"k";
}else{
return num;
}
}
formatNum(exp);```
@hearty flame check it out
.toFixed(2) gives you the number with 2 decimal places
ah
awesome ty
And the placeholder will be %javascript_exp% if you make it that way
ok ty
you have to define it in the config for javascript
here's the wiki: https://github.com/PlaceholderAPI/Javascript-Expansion/wiki
i should change it to player_exp_total ?
with the %%
ok ty
nashorn
after num?
👍
helpp?
https://prnt.sc/r4d3h2
bal:
expression: '%vault_eco_balance_commas% >= 1000000'
type: boolean
true_result: '&aMillionaire'
false_result: '&cbroke'
in javascript_placeholders.yml don't work
When I run /papi reload my placeholders is unregistered.
Are you using the persist method?
this ye
I didn't add that before.
Okay, so If I put that the papi will not unregistered my placeholders right?
Yea
Okay, thank you so much.
Is there a placeholderapi for pulling an external JSON file/RSS feed?
or even one to pull discord messages from a channel
i want to find a way to have an auto updated hologram for changelogs
discordSRV??
can i parse variables without needing a playername or plugin? (ie global variables like %server_version%) the parse command requires a playername...
It requires a player but doesn't need a valid player. So you can use any online player or null if you're using the method itself.
?
hi, can i use placeloldersapi to display information from one server (not the world) on another server?
nope, at least not for now or I haven't found anything like that. maybe in v3 tho
Does anyone know if https://www.spigotmc.org/resources/expansion-statistics.20745/ works? Since none of the placeholders are working for me.
Is that even necessary to download that resources
/papi reload```
@sweet terrace what mc version?
1.15.2, the /papi ecloud download Statistics gives me 'No expansion found with the name: Statistics'
It’s statistic lmao
No s at the end
That fucked me up too in the beginning
@sweet terrace
@carmine veldt Perhaps suggestion, "advance" this command in papi3, instead of just saying it's not the correct expansion, a list of similarly named expansions could be returned. To help never people with naming
sure
Didn't I show you this a while back?
Anyhow, use javascript
var faction = "%faction_placeholde%";
function hasFaction()
{
return faction == "[no-faction]" ? "" : faction;
}
hasFaction();
Just getting back into MC.
Do you know how to use JS or do you want a link to a guide?
Where does this go again?
formats:
default:
priority: 2147483647
channel: ''
prefix: '&8[&r%luckperms_prefix%&8] &8[&r%factionsuuid_faction_name%&8] '
name_color: '&7'
name: '%player_name%'
suffix: '&f: '
chat_color: '&f'
channel_tooltip:
- ''
prefix_tooltip:
- '%player_name%'
- '&bRank: %luckperms_prefix%'
name_tooltip:
- ''
suffix_tooltip:
- ''
channel_click_command: /ranks
prefix_click_command: /ranks
name_click_command: '/msg %player_name% '
suffix_click_command: ''
And head over to #spigot-linking
I have that installed now what?
Follow the guide
are you using FactionsUUID ?
SaberFactions
Yes
can you try to find nofactions-prefix in it ?
Like in my faction folder?
yes
@brisk coral Has the right method he just wont tell me the last part
Please don't ping
yeah but there's an easier method
I'm assuming Tangu is reffereing that you can change the string which is outputted if a user is not in a faction
yep
I dont want their to be any brackets or anything
Like simply just your User Rank tag when not in a faction
I wish you told me where the guide is because I cannot find it.
So put what you sent into plugins/PlaceholderAPI/javascript_placeholders.yml
?
Read tutorial
Nope
example:
file: factions.js
engine: nashorn
With
var faction = "%faction_placeholde%";
function hasFaction()
{
return faction == "[no-faction]" ? "" : faction;
}
hasFaction();
Didnt work 😦
Elaborate didn't work
Also you need to use %javascript_factions% instead of the factions one inside your chat format
wait wtf
why do you have %factionsuuid_faction_name% if you use SaberFaction ?
oh
ok I said nothing x)
Thats the holder for it
and btw this is how it should be in your chat format
you named your placeholder example
example: file: factions.js engine: nashornWith
var faction = "%faction_placeholde%"; function hasFaction() { return faction == "[no-faction]" ? "" : faction; } hasFaction();Didnt work 😦
so yes it won't work with %javascript_factions%
change
file: factions.js
engine: nashorn
to
file: factions.js
engine: nashorn
Tangu, that actually shouldn't be the case, if I'm not mistaken
in your placeholderapi javascript file
But I always name it the same as the file so no clue if that's actually true kek 🤷♂️
it should
use the placeholder %javascript_factions% in your chat format
and the uuid one in the file
and rename example: to factions: in your javascript placheolders file
var faction = "%factionsuuid_faction_name%";
function hasFaction()
{
return faction == "[no-faction]" ? "" : faction;
}
hasFaction();
not here
This is right tho?
javascript_placeholders.yml
😢
you named the FILE factions.js
but you haven't named the PLACEHOLDER factions,
ok I'll start from 0
Ya were not even close xD
Yes
set ```
factions:
file: factions.js
engine: nashorn
you changed it or not ?
Yes
ok
Please use a paste service to share configs, errors, code and long logs.
• HelpChat Paste
@halcyon basin So what's the current status? What are you struggling with
I dug up with old one you made me
var faction = "%factionsuuid_faction_name%";
var color = "%rel_factionsuuid_relation_color%";
var ezranks = "%ezrankspro_rankprefix%";
var vault = "%vault_prefix%";
function chatFormat() {
if (faction !== "") {
return `&7[${faction}&7] ${ezranks} ${vault}`;
}
return `${ezranks} ${vault}`;
}
chatFormat();
I edited a lil and it still says script errors
Im using luck perms prefix now and not ezranks
Can you use ${} ?
It works so yea you can
%luckperms_prefix%
We'll it worked
maybe with another engine ?
Can we stay on topic ❤️
Do you still want all the placeholders above?
or do you want just the faction one so you can edit the rest inside the chat format itself
Can we stay on topic ❤️
Huh
Tangu, it was nashorn so no (iirc)
k
When not in a Faction I need it to show just luck perms with a brackets
When in a faction it needs to show luck perms prefix in brackets and factions tag w/relation colors in brackets
^
var faction = "%factionuuid_faction_name%";
var color = "%rel_factionsuuid_relation_color%";
var prefix = "%vault_prefix%";
function chatFormat()
{
return faction == "" ? prefix : '&7[' + color + faction + '&7]' + prefix;
}
chatFormat();
Try that, just interested if it'll work with ${}
just return prefix, no need for the extra stuff
and you have to use backticks for ${} to work
Gaby, it's for science
it's for science
lel
`${prefix}`
Do I need to change anything?
Copy paste that, no need to change anything
whats Gaby talking about?
Was talking about the previous example where I used ${value} instead of just value
var faction = "%factionsuuid_faction_name%";
var color = "%rel_factionsuuid_relation_color%";
var prefix = "%vault_prefix%";
function chatFormat()
{
return faction == "&6[&ano-faction&6]" ? '&7[' + prefix + '&7]' : '&7[' + color + faction + '&7]' + ' &7[' + prefix + '&7]';
}
chatFormat();
Try that
So I don't keep reposting the message
Try that
No clue then, there has to be a way to change that [no-faction] to something else
Then it would show the brackets only?
It would show a blank string, which is easier to check then a colored string
Well what should I do boss man
=paste
Please use a paste service to share configs, errors, code and long logs.
• HelpChat Paste
Show the factions config
*PlaceholderAPI v2.10.4
*PlaceholderAPI Statistic Expansion v1.9.2
*Sever spigot-1.13.2
https://i.imgur.com/b4MvI9G.png
How do I use this?
?paste
so how can i fix it?
Which placeholder were you using?
GrandDaddySmoke Not the paste I was talking about, but it's atleast dark theme.
I tried.
oops, It's OKAY when I change to %statistic_kill_entity:ZOMBIE% from %statistic_kill_entity_ZOMBIE%
ty
@halcyon basin There should be an option in the lang file to change the [no-faction]
line 1422 apparently
Checking just remove it?
I mean yea now adjust the check..
Now were stuck with the brackets and can we put the UserRank before the Faction tag
What check dog im a skid
I can see yea,
replace [no-faction] with empty string
I did that
Show me what you have rn
return faction == "" ? '&7[' + prefix + '&7]' : '&7[' + color + faction + '&7]' + ' &7[' + prefix + '&7]';
Just removed that from here to
can you switch the prefix to the front for me?
I mean ,-,
Wait what did you do, why did you add the braces back when the string is empty?
function chatFormat()
{
return faction == "&6[&ano-faction&6]" ? '&7[' + prefix + '&7]' : '&7[' + color + faction + '&7]' + ' &7[' + prefix + '&7]';
}
chatFormat();
Heres it unchanged
Oh shit I messed that up lmao
function chatFormat()
{
return faction == "" ? '&7[' + prefix + '&7]' : '&7[' + prefix + '&7]' + ' &7[' + color + faction + '&7]';
}
chatFormat();
function chatFormat()
{
return faction == "&6[&ano-faction&6]" ? prefix : '&7[' + prefix + '&7]' + ' &7[' + color + faction + '&7]';
}
chatFormat();
Why is mine not the same color?
two different languages
change the no-faction to empty string before ofc
the one in the function?
or the lang file
ive removed the stuff in the lang file
Copy the above function, just edited it
What's the error
function chatFormat()
{
return faction == "&6[&ano-faction&6]" ? prefix : '&7[' + prefix + '&7]' + ' &7[' + color + faction + '&7]';
}
chatFormat();
Using this exactly
I mean what about the var's ?
like console error
function chatFormat()
{
return faction == "&6[&ano-faction&6]" ? prefix : '&7[' + prefix + '&7]' + ' &7[' + color + faction + '&7]';
}
chatFormat();
This is my factions.js file
var faction = "%factionsuuid_faction_name%";
var color = "%rel_factionsuuid_relation_color%";
var prefix = "%vault_prefix%";
put this above the function chatFormat()
should I be changing the vault_prefix to the luck perms one?
They both return the same thing so no need
I mean you can if you want to but it won't change anything
Hello, the Statistic placeholder does not work for me "it is installed but the stats are not updated" I am using spigot 1.12.2 what can I do? "no error appears"
And remove the previous expansion
I am using that version
I mean yea, I'm asking which placeholder doesn't work
None works for me
@halcyon basin Remove the &6[&ano-faction&6]
everything is installed correctly but the stats not updated when I do something "mine blocks, kill mobs .."
Where are you using the placeholders Abyx
GrandDaddySmoke, that's because you don't read the chat, I told you I updated the message and you didn't copy it
function chatFormat()
{
return faction == "" ? '&7[' + prefix + '&7]' : '&7[' + prefix + '&7]' + ' &7[' + color + faction + '&7]';
}
chatFormat();
Is this the right function?
Yes, but you also need the variables
var faction = "%factionsuuid_faction_name%";
var color = "%rel_factionsuuid_relation_color%";
var prefix = "%vault_prefix%";
function chatFormat()
{
return faction == "" ? '&7[' + prefix + '&7]' : '&7[' + prefix + '&7]' + ' &7[' + color + faction + '&7]';
}
chatFormat();
right frosty? xd
mhm
@warm topaz did we lost you too??
huh
{
}
i just copied whatever frosty put it
and combined the messages
but yes i guess u lost me too, i prefer i like that
f this shit
function chatFormat() {
}
Just a fyi, the relation color placeholder won't work.
Or depends on where you're using it and how it parse the placeholders.
Can we get a placeholder for current bungee server? the same name that /server uses. I know %server_name% exists but that means for every server I'd have to edit in two places, which defeats the purpose of PAPI imo
I need the name of the server the user is on, not the player count
ah
https://www.spigotmc.org/resources/hub-connector-multi-hub-ping-find-hub-command-bungee-reconnect.53438/
Plugin but might be useful to an extent
What does that plugin have to do with giving me a Placeholder for the name of the server the user is on?
Plugin but might be useful to an extent
And don't think u can do what ur asking with placeholderapi maybe in v3
and it has a /find
which tells u what server the player is on
I just want the staff chat messages to have the current server they’re on in the prefix
Hello everyone, I am trying to create a balancetop gui in deluxe menus, I read that some of the vault placeholders aren't available for offline players. Does anyone know of another way to get offline top balances? I'm not seeing any other hooks. I'm having a hard time figuring out what to even google. If anyone has any tips that would be much appreciated!
Essentials might be able to
Didn't see any hooks for essentials that would work. There are only hooks for the player, rather than for others.
Does essentials just store their top balances, which allow them to get a baltop? I assume I'll probably have to do something similar
looking to find out why PAPI can't "find" a player that is online - /papi parse <playername> results in "Failed to find player xyz"
i have things that depend on new players having parsed placeholders
It doesnt work with offline players
the only common factor is that it only happens on their first join
if they reconnect it magically works
(i can use /papi parse, etc)
but otherwise i cant use any player-based placeholders related to that player
(or use parse cmd on them)
anyone?
are players not saved when they join?
do you have a plugin that saves players every x minutes or something like that?
@mint fable nothing of the sort
@vestal flicker
Please respect the rules, be patient and don't ping staff members!
joining on first time and then executing /save-all also didnt do anything
PAPI still refuses to find me until ive reconnected
%player_item_in_hand_level_<enchantment>% trying this but confused with the enchantment id, could someone help me?
what's your server version ?
@vestal flicker do you have ProtocolSupport or ViaVersion + ViaBackwards ? because I remember someone had a server on 1.14.4 and I joined on 1.12.2 and the parse command couldn't find me
but when I joined on 1.14.4 it worked
anyone ?
me ?
yes
1.12.2 paperspigot
when the item got enchantment(while holding the item in hand), the material wont appear in the menu
any enchantment
I don't understand the problem, in your DM menu you have an item and it doesn't appear enchanted ?
sry but i didnt use DM
I know
but I don't understand your problem
what's not appearing ?
the item or the enchantment ?
and what does the placeholder has anything to do with it ?
i put that to the material lore, when i reload the items is disappear idk why
Please use a paste service to share configs, errors, code and long logs.
• HelpChat Paste
ok
Hey, so I'm trying to display my players playtime in a GUI and I've installed the Playtime extension but when I use the variables on the wiki it doesn't work
https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Placeholders#playtime
Hmm, okay so it doesn't seem to be installing when I do /papi ecloud download PlayTime
Okay so it seems that no extensions are being installed when I use /papi ecloud download
do you have the plugin ?
when you see that an expansion name is in blue and that you can click on it on the wiki page, that means that it needs the plugin
%math_{player_item_in_hand_level_DIG_SPEED}+1% any way to making it real number not decimal ?
Add [precision:0]
%math_{player_item_in_hand_level_DIG_SPEED}+1[precision:0]%
@compact dagger
@junior musk dont have anything like that, i do i have protocol lib but no version gimmicks
for some reason my essentialschat placeholders arent working vault_suffix & ezrankspro_rankprefix
I have them all installed also
oh i know why, silly me
@junior musk dont have anything like that, i do i have protocol lib but no version gimmicks
Idk then
for some reason my essentialschat placeholders arent working
vault_suffix&ezrankspro_rankprefix
You need anpther plugin to use PlaceholderAPI in EssentialsXChat
Tanguygab, I'm back. Players are able to remove their tag which I don't want to happen and the force permissions isn't working.
I have the default group and I need it to always show the default tag I created on players in the default group. They shouldn't be able to remove the tag.
yeah it was actually ChatInjector
yeah I couldn't remember the name x)
I have the default group and I need it to always show the default tag I created on players in the default group. They shouldn't be able to remove the tag.
/lp group default permission set deluxetags.clear false
Yes
(by adding false after the perm)
Yes
what command are they executing to remove the tag ?
Doing /tags and then click the remove tag head
then I think you can't deny them from doing it
maybe post an issue on DT's GutHub to request it
Am I able to remove the button from the GUI?
Yep, it broke it
Then I don't understand the point of the plugin. It is created to let players choose their prefix, but if they want to remove the custom prefix, it doesn't return the default one
the point of the plugin is to create tags that are cosmetics, and they are not forced to be used as prefixes
Is this plugin used on Manacube?
idk
I have problem about my placeholders
So I added papi and installed placeholders
Like server, player etc..
And at start, it worked
But now when i restarted server it shows me unknown placeholders
What's your placeholderapi version
It's the latest
Any console errors?
lemme check
=paste
Please use a paste service to share configs, errors, code and long logs.
• HelpChat Paste
I send you screenshots frosty in dm
Paste the error in a paste, and paste the link here, personally I've never seen that error before in my life so not sure where to even look
A member of staff has requested I move your message to a paste,
Most likely beacause it contains a config/error/code snippet.
here
nvm |
@brisk coral I fixed it
I just reinstalled papi
And now it works 🙂
Thank you anyway
Have a nice day 🙂
Very odd error though, you too
Didn't see u quote someone
@mental night 😂
Hey can someone help me out and create a js placeholder that checks a %vault_suffix% if it has a suffix it says true if no it would say false?
function f() {
return "%vault_suffix%" !== "" ? "true" : "false";
}
f();```
@sharp jay
@vivid sparrow need the true & false part 😛
😉
So I've got a crate plugin and a items that have been renamed to what I would like them to be, but the crate plugin just simply puts out the item material. Is there a placeholder for displaying an items name?
is there a placeholder for supermobcoin to put in deluxechat ?
@junior musk Unknown expansion.
If SuperMobCoin have a PlaceholderAPI expansion, then yes
Well does it
they have placeholders according to the plugin page but i dont see an expansion
it doesnt though
i dont have the expansion downloaded however the plugin says theres placeholders for it
I'll check
Try to do /papi parse me %supermobcoins_mobcoins%
Does it returns the placeholder or the right amount?
still looking to find out why PAPI cant find players on their first join - really need to fix this
Hello, can someone help me how I can write a javascript with the PlaceholderApi where he checks the item whether the lore is still free. And choose a random number from 1000 to 2000.
@wispy mortar free as in doesnt have lore?
I just want to have the item's lore checked to see if it is set or not.
And what about the random number part?
Yes, if there is no item lore set it should make a random number
function checkItem() {
var min = 1000;
var max = 2000;
var hand = BukkitPlayer.getInventory().getItemInHand();
if (hand == null || hand.getType().toString().equals('AIR')) {
return '0';
}
if (hand.hasItemMeta() && hand.getItemMeta().hasLore()) {
return '0';
}
return randomNumber(min, max);
}
function randomNumber(var min, var max) {
return (Math.random() * max) + min;
}
checkItem();```
@wispy mortar this should work
What does getIteminHand actually mean? If I get the item now, for example, then I'm not holding it in my hand.
here
that's the method to get player's item in hand
what item do you want to check then?
I have a CrackShot plugin and I want to put a RandomNumber on a lore, but the problem is that it is broken every time and that means it would make a new generated number.
hm
do you want the items to be unique or?
the thing is that you will have to tell to the js which item to check
We want to leave a serial number on items so that you can track them in logs.
you might want to try UUID or another system because this id wont be unique
ok
Anyone know if it's possible to do a unit conversion of a placeholder with papi ? 🙂
definitely - if you are talking about math
I want to convert a placeholder in millisecond into hour in a deluxemenu
you can use math for that
how i can use math into menu ?
%math_{placeholder}/(1000*60)%
yw
yes
okok, thanks
@arctic loom can you have spaces inside math placeholders?
Nope. Why would you want that?
just wondering
And there is a way to precise how many number i want after comma ?
Setting the precision on config will affect all placeholders but you can edit it for one placeholder by adding [precision:#] at the end
Yes. You can set it either in the config of PlaceholderAPI, or per placeholder using the [precision:<number>] option.
https://github.com/Andre601/Math-Expansion/wiki/Placeholders#precisionnumber
thank you so much !
If i have a server restarting every 6 hours, what would be a good place holder to use when wanting to show the time until restart in a tab list that can use placeholders?
just get a message announcer to count down or smthing
hmmm
Why do you even restart every 6 hours?
Like I get it if it was every 24 hours, but every 6???
I used to restart every 6, it was modded so it was slightly needed at the time
But now they restart every 12 hours
6 Hours gives me multiple openings when it comes to adding in something new and i would rather the restart be the thing to load it in, instead of manually restarting at that time including with players on.
6 Hours is also not that often and is pretty reasonable with how i am running things. It may change later on but not right now.
Either way, i am still looking into what i can do to display a consistent timer of when the restart will happen whether it be 6, 8, 12, or 24.
Hi, I'm using luckperms extracontexts which allows for placeholderAPI contexts.
I'm looking for a simple placeholder which can be true when a player first logs on and is otherwise false. Or if its a integer placeholder, counts upward after logging on. Are there any placeholders that come to mind?
Should your host not allow connections to the PlaceholderAPI eCloud, you can manually download expansion from https://placeholderapi.com/ecloud and place them in your /plugins/PlaceholderAPI/expansions/ folder.
@thorny mural
[17:27:28 INFO]: [PlaceholderAPI] 167 placeholder expansions are available on the cloud.
[17:27:28 INFO]: [PlaceholderAPI] 1 installed expansions have updates available.
Getting this on a fresh install, on the first start. Haven't installed any expansions, nor does the list command give anything. Running latest 1.15.2 Paper with Vault and PAPI installed
Any expansions in the folder?
Nope
I'd ignore it, not hurting anything.
Just figured I'd report it anyway
Need to find some kind of tutorials to understand how java script placeholders work.
If you have a good decent one you know if, just direct message it to me.
I want to know if this would be possible with a javascript placeholder: There's this sleep plugin (SmoothSleep) I'm using that can display a title while the player is in bed. Normally, it'll just show the current world time, but I want to be able to show a random stat (from the Statz plugin's papi placeholders) every 5 or so seconds (e.g. "You have killed 1577 mobs on this server") or maybe even a tooltip (e.g. "Use /home to tp to your bed").
It's the "every 5 or so seconds" I'm worried about, since the title seems to update very quickly. Would it be possible to make it to hold on an output until it comes time to change?
Is there a placeholder that shoes the MOTD of a server ? (i use bungeecord)
Afaik nothing for bungeecord, no.
oh and for a server
@trim mist The eCloud appears to be down, please report this to the staff in https://helpch.at/discord.
just a server without bungee
I'm aware, eCloud is having issues so it can't pull data.
Uhhh check the wiki for the time being.
ok
@fervent moon you can show a server motd with the qpinger expansion, but I think it can't show a custom motd from a plugin, it only takes the one from the server.properties
someone told me before (Frosty I think) that there would possibly be a way to get the shown custom motd, but I didn't have any news ¯\_(ツ)_/¯
¯_(ツ)_/¯
https://github.com/PlaceholderAPI/Javascript-Expansion/wiki/Your-First-Script
@junior musk
Thank you! You are much appreciated!
Hey,
i was just trying papi on my test spigot server today and it seems like i cant parse placeholders for some players, whereas i can parse them for others.
Only message in chat is: "Failed to find player:"
Console/Logs doesnt show any error aswell.
Did anyone ever experience this and/or knows a fix for it?
Rejoin
Ok, seems like that fixed it. Thank you ✌️
Do you know why that happens by any chance?
Not really but will be fixed on v3
Oki, thanks
How to change the %player_total_exp% format? Like 1000exp to 1,000exp
I seen where is no CrazyCrates PlaceholderAPI
placeholders are built into the plugin
I try doing {crazycrates_voting_total}
%placeholder% for
placeholders
%placeholderapi_crazycrates_voting_total%
no tang
same thing
that's the format %placeholder%
So how would I put it?
no tang
but if he is using it in FeatherBoard or another plugin that only uses MVDWPAPI I mean
So how would I put it?
replace the {} by %%
I am making it show in the crate plugin
%crazycrates_voting_total%
#Toggle on and off the holograms for the crates.
Toggle: true
#The height of the hologram above the crate.
Height: 2
#The message that will be displayed.
Message:
- '&a&lVoting &7Chest'
- '&bYou have &3%crazycrates_voting_total% &aVoting &7Crates'
- '&7>> &fRight click to open!'
I already tried that
what plugin is this ?
facepalm
CrazyCrates
there are holograms in CC ?
^
Yes
^
if the author of that plugin add support for it, sure, otherwise we cant do anything on our side
they offer placeholders to use in other plugins
Go to their discord they can help you better
XD
Can I use a placeholder-api to display values on another server?
Where is the value for this placeholder being taken from?
%server_name%
It always says A Minecraft Server for me
what plugins do you have?
UltraPermissions, IllegalStack, Papi, ProtocolLib, TAB, Vault
surely its TAB
what do you mean? tab has an additional placeholder which is just called %server% but you can't use that on a server. only on the proxy
maybe papi config ?
there's a function called server_name so surely its grabbing from there no?
thanks
I tried google, I already tried a lot of stuff like setting that key in the properties. it was too simple to see.
always the simple things you overthink
i've come to find
i did literally just search "%server_name% placeholder" on google and found a thread about the same issue tho ;p
🙃 damn it
lol
mojang removed from server.properties on 1.14
Lol what
no?
No? 🤔
mojang removed from server.properties on 1.14
wut
I don't think they will ever remove that.
Let me check on my server
Inside the config.yml file in the PlaceholderApi folder
expansions:
server:
server_name: Server Name```
you need to install the expansion with /papi download Server and /papi reload
im confused, whats that got to do with server.properties
^^ lol
Okie
We don't have an expansion by that name in the eCloud.
if it's in /papi list then that means that it is enabled
so you can use placeholders
is not working with holographicdisplays and i dont know why
because HD doesn't support PlaceholderAPI
Oh, really?
I dont know that, thanks.
you need to download ProtocolLib and HolographicExtension to make placeholders work in Holograms
then it will work =)
Thanks
❤️
Is not working anyway, i have tested so much
I dont know why not work, i have protocol lib, holographicextension, placeholder api and holographicdisplays
what placeholder did you try ?
%ajpk_stats_top_name_1% and other
can you try to do /papi parse me %ajpk_stats_top_name_1% and tell me what it returns
did you restart when installing ProtocolLib and HolographicExtension ?
it is usefull for some plugins sometimes
but it's true that most of the time it breaks things
Yes now work, thanks so much.
I will think if not use more plugman, the true me dont like use that ever but well, thanks.
you can use it, but if yiu notice that things don't work properly, try to restart
Plugman is great just a few plugins don’t work after being messed with one being protocollib, however I won’t let you insult a plugin that helps me reload my plugins loads of times no issue at all while I’m creating it.
Yeh
When configuring with just urself
its fine
But if you have a playerbase or more and its not for configuring
Ehh
U should look otherways
Has the Pinger expansion been removed from the ecloud??
Try deleting it and redownloading it
Did that, internal error upon reloading: https://mcpaste.io/00ac5448a31a4374
Something related to LuckPerms?
Pinger is now registered 🤔
Yeah update luckperms to v5+
Make sure the expansion is also the latest
The expansion cloud is not enabled. Something on my end? I'll download manually for now
How to change the %player_total_exp% format? Like 1000exp to 1,000exp
let me find my link
var num = parseInt("placeholder_goes_here");
function numberWithCommas(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
formatNum(num);
This is a javascript placeholder
you put the placeholder you want to parse in the area designated
so parseInt("%player_total_exp%")
You also need to download the javascript expansion and you can learn more here: https://github.com/PlaceholderAPI/Javascript-Expansion/wiki
👌
var maxNumber = 10;
function randomCommands() {
var number = radomNumber();
switch(number) {
case 10: {
return '/give %player_name% stone 10'
}
default: {
return '/give %player_name% stone 1'
}
}
}
function randomNumber() {
return (Math.random() * maxNumber) + 1;
}
randomCommands();```
@gloomy crater this might work
w8 you made it so %javascript_random% changes to a random cmd?
that's what you want?
hmm, sec
try now
I want it so when players rightclick an item, it performs a random command (the rightclick item has already been made, I just have to get the ranomizer)
aight
javax.script.ScriptException: ReferenceError: "radomNumber" is not defined in <eval> at line number 1
oh I see the issue
change it to randomNumber() xd forgot a n
yea noticed lol
its working :D thanks
so I just have to add a case 2: bla bla bla to add more commands?
var maxNumber = 10;
function randomCommands() {
var number = randomNumber();
switch(number) {
case "10": {
return '/give %player_name% stone 10'
}
default: {
return '/give %player_name% stone 1'
}
}
}
function randomNumber() {
return ((Math.random() * maxNumber) + 1).toFixed().toString();
}
randomCommands();```
Here, fixed version.
yes, but dont forget to add "" around number
yw
`>.... [22:37:24 ERROR]: [PlaceholderAPI] Failed to init placeholder expansion from class: com.extendedclip.expansion.redisbungee.RedisBungeeExpansion
.... [22:37:24 ERROR]: [PlaceholderAPI] Channel must contain : separator (attempted to use RedisBungee)`
anyone how to fix
worked fine before
Why happen this?
[04:36:30 WARN]: [InfiniteAnnouncements] Loaded class me.clip.placeholderapi.PlaceholderAPI from PlaceholderAPI v2.10.4 which is not a depend, softdepend or loadbefore of this plugin.
Can someone tell me why papi wont register redisbungee expansion?
Believe the expansion might be outdated https://github.com/PlaceholderAPI/PlaceholderAPI/issues/252
lovely
oh
How would I use a scoreboard objective which has a _ in it? %objective_score_ts_DthCreeper% returns an internal error.
try renaming the objective ?
So there is no way to use such.
like, with a NBT editor
%statistic_entity_killed_by:creeper% will work, whatever.
What is wrong with this JavaScript?:
function always() {
if (p === "Wkrotce" ) {
return "&a&lStart już wkrótce";
} else if (isNaN(p)) {
return "&a&lStart za: &e" + p;
} else {
return "&c&lBłąd";
}
}
always();```
I am learning
It cannot load
By putting this into Javascript folder
did you also add it to the javascript config?
Yes I have 1 other scripr already
Are there errors?
You say that something is wrong, but nothing looks wrong, I ran it through a tester and it works
so what is the issue? how do you know something is wrong?
When I do /papi reload there is no message about this JavaScript
There is a message about this other tho
You probably forgot to register it
Can someone guide me please on how to properly uninstall an old ecloud listed extension? I've tried a variety of things, from removing jar and clear cache, and i dunno what, but each server restart it just shows up again. Thank you in advance.
uhm.. done this as well.. will do it with papi reload on top. maybe ive just tried too many tthings without noticing proper results.
which expansion is it?
mcmmo (for mcmmo classic placeholders)
after stop and start, papi ecloud list installed shows;
1: McMMO -- http://api.extendedclip.com/media/Expansion-mcMMO_wPkfGmm.jar
i can't even tell anymore now if that's the old one or electroniccat's new mcmmo 2.2's jar installing that one as a new one.
have you gone into the config.yml of placeholderAPI and removed it from the config then reinstalled the correct one?
maybe i should just go to bed.
check_updates: false
cloud_enabled: true
cloud_allow_unverified_expansions: false
boolean:
'true': 'yes'
'false': 'no'
date_format: MM/dd/yy HH:mm:ss
expansions:
player:
ping_color:
medium: '&e'
high: '&a'
low: '&c'
Remove what from config.yml ?
running PlaceholderAPI version 2.10.5-DEV-83 with git-Spigot-8faa8b4-13ed05d (MC: 1.15.2) (Implementing API version 1.15.2-R0.1-SNAPSHOT) btw. just to clarify. with mcMMO 2.1.latest
mcmmo shows under papi list and McMMO shows under papi ecloud list installed
what i pasted above is all i have (minus some top # comments) in my config.yml.
Are you sure you're deleting the correct file?
In the correct server directory
@topaz parcel Hope you double check when you're awake 👍
He left XD
I see
hi im having an issue with DeluxeMenus and Papi
wait hol up
what expansion uses %player_name%
ah Player
nvm i found the solution
Just a quick question, am i able to use this plugin and another comatible plugin to display a tag as a prefix of players?
if the chat formatting plugin is compatible, yes!
yeah i figured out how to do it and i did a lot of other amazing shit aswell, and it took me 1 min to do it, its hella easy, i feel fucking dangerous after i installed this plugin, i could use this to hack the fucking government now wtf
thanks
bye
https://cdn.discordapp.com/attachments/554234775590666251/684091095721967623/unknown.png https://cdn.discordapp.com/attachments/554234775590666251/684091141859180573/unknown.png why does it display it so wierd even though it's not the value? Skript placeholder.
and Kiteboard for the scoreboard
Anyone use the papi maven repo
Sorry, i dont download ecloud 😄 Problem solved 😄
I do, why clip?
I added ssl to the repo url and want to make sure it works fine
GOD himself in chat
does papi have an placeholder to get bungee servername?
like the server you are in?
hi
im having some trouble with the uptime placeholder
i want it to only display days and hours
ive tried to use %server_uptime_dd.MM_1d.1h%, which doesnt work. Kinda obvious
🤔
Hi, I'm trying to set up a LeaderHeads armor stand that populates with the latest player to join my server. is there a placeholder for that?
The last three players would be epic.
hmm
It'd be at first login, not at the point of being whitelisted
Don't thing there currently is a placeholder for that
Righto. Thanks anyway.
may i get help to my problem please?
I don't believe uptime supports that. Just countdown and time.
JS might be your solution for that
^
Hello I'm trying to create my own placeholder and basically I want to turn this message into a placeholder
I followed the instructions but how can I make the message return the value of this // %someplugin_placeholder1% if(identifier.equals("placeholder1")){ return plugin.getConfig().getString("placeholder1", "value doesnt exist"); }
just return that text
return "&b&lSERVER GOAL: &f" + counter + "&7/" + "&f" + woodNeeded + " &bLogs Chopped"
I'm assuming that's in a different class? So just use the actual placeholder
Doesn't seem to be related to PlaceholderAPI, ask in #general-plugins or #general-plugins-2 please.
@rigid lance PlaceholderAPI doesn't support JSON (text component) as a return value. You can only return strings.
But you can send them another messages using that method you sent.
Can use papi with LuckyPerms on SignCommands? Example:
/lp user {user} parent set {vip/super/ultra... }?
I want to create Gang/FBI system in GTA Server with permission plugin.
So I have this
if(identifier.equals("placeholder1")){
return plugin.getConfig().getString("placeholder1", "value doesnt exist");
}
Config: placeholder1: "§b§lSERVER GOAL: 5K Logs"
how do I use the placeholder now?