#placeholder-api
1 messages · Page 136 of 1
oh
EssChat does not support PAPI unfortunately
i cant
why not?
not my choice
A plugin which would be able to scrape a text from the server and be able to convert it into a placeholder. For example, a anticheat may have a linear message such as 'player has failed check (type) vl', you would be able to scrape the line by using regex and taking the info where set.
:P add me on discord if you wanna know more :P Etherised#3532
Is there a way to see the placeholders for other players on my server?
papi parse me|name %placeholder%
or if you want to use it somewhere else use the ParseOther expansion
ty!
Yes
@steep thorn,
Please respect the rules, be patient and don't ping staff members!
Ye I just kinda forgot and someone seems to have unpinned the message.
Still, how do I use this placeholder? Please write an example!
%gradient_percent_{#hex1}_{#hex2}_{percentage:0..100}%
Idk about this, should I just push version update to 1.7.0 for a new supported scripting engine for JS-Expansion? Cause with my latest current OpenJDK, I can't develop with Nashorn anymore
Hi, I need help please.
luckperms' %luckperms_group_expiry_time_<insert>% placeholder shows wrong value/date.
How to reproduce:
1.Download luckperms' latest release (LuckPerms 5.2.35)
2.Download PAPI's latest release (PlaceholderAPI 2.10.9)
3.Run /papi ecloud download LuckPerms
4.Run /papi reload
5.Run /lp user <username> parent addtemp default 30d
6.Run /lp user <username> info (it will show the correct date and time)
7.Run /papi parse me %luckperms_group_expiry_time_default%
The output will show incorrect date.
Is there a fix for this already? Can anyone help me?
@austere hawk contact luckperms dev.
They said I should use dev build of placeholder and it worked. lol
Hello we are trying to use PlaceHolder API on our Paper 1.16.4 server it seems it does not support yet is there any way or maybe a dev build available for it?
Paper 1.16.4?
Yup
Make sure you have the correct expansion for the placeholder you're trying to use installed
I'll go double check because we already tested that.
how do I make long holograms work?
the holograms is too long it can't display the whole placeholder.
https://gyazo.com/3bc2d412344bf499b4b83c7062449bae
yes
Just to double check you have the math expansion installed
and have HolographicExtensions installed too
It works when It's shorter, it doesn't work when I add too much
wdym validate?
for leaderheads
um I never used leaderheads.. but you can use /papi parse me %placeholder_here% to test placeholders
ok ill try
sorry if I'm way off, I don't get what you mean by validating
its for leaderheads you need to validate the placeholder
When i use /papi parse me %statistic_player_kills%
it out puts 1
yup I got it now thank you so much for your help!
np 🙂
for the placeholder statistic_mine_block:<material> what should i type for material for diamond ore and emerald ore?
DIAMOND_ORE and EMERALD_ORE
I can't get the Statistic Expansion to work
it gives blank responses for playtimes
@ me when responding pls
What's your server version and your Statistic Expansion version?
1.16.4
oh
make sure you're on latest Statistic and also
use the dev build for PAPI
not the release
you fully restarted the server after using the PAPI 2.10.10-111 ?
what placeholder is showing that?
is not working*
lmao remove it please @proud tide
/papi parse Agaloth %statistic_time_played%
showcase is meant for showcasing projects
oh
?imgur
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/ to upload images/screenshots.
if you want to post images here ^
that's very strange
I'm on 1.16.4, latest statistic, latest papi dev, and it works fine
hmm what could cause it
I rly don't know to be honest
the other placeholders such %statistic_damage_dealt% gives numbers
but only time placeholders gives a "void" response
Plugins (115): AdvancedEnchantments, AirBar, Aliases, ArmorStandTools, BannerBoard, BattlePass, BlockLocker, BlockParticles, BuycraftX, CS-CoreLib, CarbonChat, ChatReaction, ChestShop, ChestShop-towny, ChestTerminal, Chunky, ChunkyBorder, Citizens, CitizensCMD, ClearLag, ColoredAnvils, CombatLogX, CommandRegions, CustomCrafting, DeathMessagesPrime, DeluxeCommands, DeluxeJoin, DeluxeMenus, DeluxeSellwands, DeluxeTags, DiscordSRV, Dynmap-Towny, Elevator, Essentials, EssentialsSpawn, GSit, GappleOptions, Gatekeeper, GodsEye, GoldenCrates, Graves, Harbor, HeadDatabase, HolographicDisplays, HolographicPlaceholders, IllegalStack, ImageRenderer, InventoryRollback, ItemsAdder, JakesRTP, Jobs, KiteBoard, LeaderHeadsRevamped, LightAPI, LimitPillagers, LiteBans, LoneLibs, Lottery, LuckPerms, MVdWPlaceholderAPI, MessageAnnouncer, MineableSpawners, MobArena, Multiverse-Core, Multiverse-Inventories, Multiverse-Portals, NexEngine, NightVision, NotTooExpensive, OldCombatMechanics, OpenInv, PacketListenerApi, PlaceholderAPI, Plan, PlayerKits, PlayerVaults, PlayerWarps, Prism, ProCosmetics, ProtocolLib, ServerListPlus, ServerUtils, ShopGUIPlus, ShopGUIPlusMineableSpawnersBridge, Slimefun, SpeedyPaths, SuperVanish, TAB, TheNewEconomy, TitleManager, TokenManager, Towny, TownyChat, TownyFlight, TownyNameUpdater, TreasureChest, UltimateTimber, Vault, Vehicles, ViaBackwards, ViaVersion, VoidGenerator, VoteParty, Votifier, VotingPlugin, WildStacker, WolfyUtilities, WorldBorder, WorldEdit, WorldGuard, XLTournaments, dynmap, mcMMO, spark and zAuctionHouseV2
idk if that can be the cause
you got any plugin that works with player play time?
I did before
I can't go thru 100+ plugins lmao. I'm going to go crazy
I deleted them because it wasn't updating numbers anymore
after 1.16.4
I'm on 1.16.4 purpur however
Hello!
How do I use the math expression to add 2 variables together? Could I have an example please?
%math_[precision:0]{placeholder1}+{placeholder2}%
Placeholders Autorank do not works in 1.16.4 ?
[02:49:21 INFO]: Panda_Barbe issued server command: /papi ecloud download AutoRank
[02:49:21 INFO]: [PlaceholderAPI] Fetching available expansion information...
[02:49:21 WARN]: [PlaceholderAPI] failed to download expansion information
java.util.concurrent.CompletionException: java.lang.NullPointerException
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314) ~[?:?]
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319) ~[?:?]
at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:645) ~[?:?]
at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:479) ~[?:?]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) ~[?:?]
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020) ~[?:?]
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656) ~[?:?]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594) ~[?:?]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177) ~[?:?]
Caused by: java.lang.NullPointerException
at me.clip.placeholderapi.expansion.manager.CloudExpansionManager.lambda$null$7(CloudExpansionManager.java:199) ~[?:?]
at java.util.HashMap.forEach(HashMap.java:1336) ~[?:?]
at me.clip.placeholderapi.expansion.manager.CloudExpansionManager.lambda$fetch$8(CloudExpansionManager.java:192) ~[?:?]
at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:642) ~[?:?]
... 6 more
/papi parse me %player_y% shows " %player_y%"
as well as any placeholder
i have latest version
its not working at all
please help
Does somebody know a fix? latest spigot and bungee
A member of staff has requested I move your message to a paste,
Most likely beacause it contains a config/error/code snippet.
what is wrong with this:
%math_[precision:0]{luckperms_expiry_time_essentials.fly}+500%
i tried this aswell: %math_[precision:0]{luckperms_inherited_expiry_time_essentials.fly}+500%s but it dosent work
statistic doesn't work at all on my server
even after deaths it counts as 0
and time based placeholders in statistic gives a null result
try using the dev build of it
Define 'doesn't work'
What does it show
What i found out is that the luckperms placeholder Also says the seconds and minutes. So i cant use that placeholder
I got some help from luckperms so everything is sorted
I’m using the dev build already
mhm, make a github issue on it is what i would do
unless it’s already an issue regarding it on there
Apparently no one has this issue
I tried without plugins (same issue)
changing my server jar to paper 1.16.4 (same issue)
tried reinstalling the statistic expansion (same issue)
updating papi (same issue)
using a dev build of papi (same issue)
strange
I have announceadvancements disabled
does that change anything?
in spigot.yml:
disable-saving: true
disabled:
- minecraft:story/disabled```
oh wait
disable-saving: true
forced-stats: {}```
let me test it
nooooo
that was actually the issue
How come when I parse a placeholder with /papi parse me ..... I get a different out put from when I parse through a javascript placeholder? (/papi parse me %javascript_.....)
For example;
var timeTill = "%essentials_kit_time_until_available_" + args[0] + "%";
function ee() {
if(timeTill == 0) {
return "now";
}
else if(timeTill == "no") {
return timeTill;
}
else {
formattedMsg = "&c" + timeTill.replace("h", " Hour(s)").replace("m", " Minute(s)").replace("s", "Second(s)")
return formattedMsg;
}
}
ee();
when I do %javascript_kittime_clerk% I get "no", but when I parse normally I get "0"
what's the issue?
var timeTill = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%essentials_kit_time_until_available_" + args[0] + "%");
👍
Umm... I'm not sure if that's working. @junior musk
?
When I parse through the JS, it returns "no" but if I parse normally I get a cooldown IE: "23h ...."
//var timeTill = "%essentials_kit_time_until_available_" + args[0] + "%";
var timeTill = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%essentials_kit_time_until_available_" + args[0] + "%");
function ee() {
if(timeTill == 0) {
return "now";
}
else if(timeTill == "no") {
return timeTill;
}
else {
formattedMsg = "&c" + timeTill.replace("h", " Hour(s)").replace("m", " Minute(s)").replace("s", "Second(s)")
return formattedMsg;
}
}
ee();
@junior musk Current script btw
yeah
while it should return the formatted msg ?
var timeTill = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%essentials_kit_time_until_available_" + args[0] + "%");
function ee() {
BukkitPlayer.sendMessage(timeTill+arg[0]);
if(timeTill == 0) {
return "now";
}
else if(timeTill == "no") {
return timeTill;
}
else {
formattedMsg = "&c" + timeTill.replace("h", " Hour(s)").replace("m", " Minute(s)").replace("s", "Second(s)")
return formattedMsg;
}
}
ee();
parse the placeholder and tell me what it tells you in the chat
x2 "no"
what's the placeholder you used?
try to copy again (I edited the msg)

😅
and /papi parse me %javascript_kittime_clerk% returns the right value?
the wrong value
I meant the Essentials placeholder 😅
yeah
what if you try that
function ee() {
var timeTill = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%essentials_kit_time_until_available_" + args[0] + "%");
BukkitPlayer.sendMessage(timeTill+arg[0]);
if(timeTill == 0) {
return "now";
}
else if(timeTill == "no") {
return timeTill;
}
else {
formattedMsg = "&c" + timeTill.replace("h", " Hour(s)").replace("m", " Minute(s)").replace("s", "Second(s)")
return formattedMsg;
}
}
ee();
what is the placeholder for essentials balance and luckperms rank _
%vault_eco_balance%
and %vault_rank%
and make sure to execute /papi ecloud download Vault
and /papi reload first
"noclerk" @junior musk
then idk =/
actually
yeah nah not sure about this one
function ee() {
var timeTill = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%essentials_kit_time_until_available_${args[0]}%");
BukkitPlayer.sendMessage(timeTill+"${args[0]}");
if(timeTill == 0) {
return "now";
}
else if(timeTill == "no") {
return timeTill;
}
else {
formattedMsg = "&c" + timeTill.replace("h", " Hour(s)").replace("m", " Minute(s)").replace("s", "Second(s)")
return formattedMsg;
}
}
ee();
Thank you!
what are you guys trying to do ?
oh lmao what the hell is this? PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%essentials_kit_time_until_available_${args[0]}%");
oh yeah you used $ didn't see that
lmao
you tried js PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%essentials_kit_time_until_available_{" + args[0] + "}%"); or is that not what the problem is?
we tried but without the {} around
@rotund pendant
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.
It looks like the problem with ecloud half of the plugins broken 😦
the problem is not rly with the ecloud. The ecloud seems to be working
so your host provider probably blocked connection to most things
you'll have to do as the bot said
and go to placeholderapi.com/ecloud and download the expansions from there
I want to display the users server ping on my scoreboard, do i need to download the pinger placeholder for it to work?
1 second then
let me see what the actual placeholder was
yes it is that
can you do /papi ecloud download Player and /papi reload?
@hasty prawn ^
Thanks!
👍
I need help. The essentials placeholder that shows when the kit become available again, doesn't show days
what placeholder do you use?
PlaceholderAPI-2.10.10-DEV-111
essentials
bruh
%essentials_kit_time_until_available_<kitname>%
My VIP kit is available 1 time in 30 days, I have a kit menu and I want it to show when it'll be available when a player put their mouse on the vip item
but the placeholder doesn't show days
it goes 23h 15m 15s
instead of 29d 23h 15m 15s
in your essentials config kit what delay time did you put?
30 days for VIP kit
in essentials
HELLO>?
I'm trying to display multiple things in one score, after a certain time. I've gotten it to work with just text, but what about placeholders?
# Default time in ticks for a score to stay on the scoreboard (20 ticks = 1 second)
UpdateTime: 60
# Save which players have the scoreboard disabled
SaveScoreboards: true
# Configure your scoreboards layout
Scoreboards:
example:
Titles:
- "&5&lD B A"
Scores:
13:
- "&7&m------------------"
12:
- "&7» &5&lPlayer"
11:
- " &7%player%"
10:
- ""
9:
- "&7» &5&lBlocks Mined"
- "&7» &5&lHours Played"
8:
- " &7%statistic_mine_block%"
- " &7%statistic_hours_played%"
i got it to work for score # 9
but for the placeholders they dont want to work on score 8
the statistic is installed, and works, but im not sure how to get it to work for switching after the update time of 60
this is using simplescore plugin btw
@hasty prawn what is happening exactly? You said 'dont want to work', but this doesn't tell us what happens exactly
when i say it doesn't want to work, i mean i'll save it and reload, and the scoreboard just doesnt show up
thats when trying to animate the placeholders
- "&7» &5&lBlocks Mined"
- "&7» &5&lHours Played"
these ones work fine
- " &7%statistic_mine_block%"
- " &7%statistic_hours_played%"
but these ones dont
So no scoreboard at all when using these?
yes
i've tried adding a time variable but that doesnt work either
?startuplog
Startup Log Location
Your latest startup log can be found in the logs folder of your
server directory, labeled as latest.log.
Please copy the contents and paste them to a paste service.
Type ?paste for more information.
alright, thanks, i'll check it out and get back to you later
im going to sleep, it's almost 4am
Go to sleep my man
@austere hawk,
Please respect the rules, be patient and don't ping staff members!
Why are you pinging me?
any support wasn't looking at me, sorry for ping
Wait till someone is available, and has time to help you
Or knows the answer to your question
okay sorry
Hi! How can I make placed blocks scoreboard with placeholder?
with statz
What is this even mean?
%jobsr_user_quests% - Returns the user current available quests from jobs separated with comma ,
It returns all the quests the player currently has
in the format Quest1, Quest2, Quest3
how will I use this placeholder?
Like this?
%jobsr_user_quests,1%
sorry I'm dumb. That's why I'm asking xd
It seems not to be working
what does it do?
Just "%jobsr_user_quests%"
do you have Jobs Reborn?
yes
do you have PlaceholderAPI?
yes
does jobsr show up in /papi list?
yes
then it's not a valid placeholder
oof thanks 😄
Hi! How can I make placed blocks scoreboard with placeholder?
@misty cradle I don't think there's a plugin that has that specific feature built-in
Besides a certain leaderboard plugin
*insert LH ad here*
😆
really
Is there a way to have %statistic_mine_block:<material>% count every single block mined?
%statistic_mine_block%
its lower in the list. Those first placeholders are if you want specific items, mobs etc. then the full amount placeholders are lower on the list
Oh alright. Thank you 👍
👍
Is there a placeholder that returns the amount of [item] in your entire inventory? I tried looking for it, but I dont know where to start searching.
Don't think there is an existing one I'm afraid
Is there any plugin/way to make a leaderboard for placeholders?
LeaderHeads
Too bad then. I wanted to allow people to sell all of 1 item in their inventory at once. Right now only have the ability to sell 1 and sell 64
its paid but its the best at what it does MRHumanTarget
oh wait. You wanted to see 1 type of item?
not all items?
then you can use the CheckItem expansion
No just check for 1 type of item, which you can set your own
yep then checkitem expansion
so that would be %checkitem_amount_nameequals:(item name here)%?
oooh i see it now
name will check the dispaly name so if someone rename a stone into "diamond"
Ye okay
👍
Why is my placeholder not working?
which one?
You got the expansion and the Statz plugin installed?
statz plugin, that i need to install to the plugins folder?
yes
the expansion doesn't work without the plugin
but why use Statz?
just use Statistic
it's not working as wanted, which i also dont know why, other than a plugin adding block values
because
it counts dirt as 2 blocks
oh
or grass block as 2
what server version you on?
on 1.16.4?
mhm
and you have the latest Statistic expansion?
/papi ecloud download Statistic and /papi reload
do this
and it will automatically
download the latest
yeah it works, but it still seems to have block values or something, because grass block counts as 2
and for example stone counts as 1
alright, so if i wanted to try and use statz
i need to download the statz plugin and upload it into my servers plugins folder?
on top of using papi to install it
??
yes
PAPI doesn't have that data
The Statz expansion takes the data
from the Statz plugin
ahhhh
PAPI is just an API.
that gets data from other plugins and gives it to other plugins and stuff
makes sense
not even the statistic one
and the others that need no plugin
those are taken from minecraft
mhm
alright, i'll try that now
Yes it works now, and it counts 1 by 1, thanks @turbid tide
👍
also, how do i animate the placeholders? I can do it with the texts, but not the placeholders for some reason
what are you using to animate them?
well the scoreboard plugin im using is simplescore
lemme get the 'code'
- "&7» &5&lBlocks Mined"
- "&7» &5&lHours Played"
8:
- " &7%statz_blocks_broken%"
7:
- ""
6:
- "&7» &5&lPing"
5:
- " &7%player_ping%"
score 9: works just fine
ok and what doesn't work then?
but if i added another placeholder under the statz broken one
it wont switch between them
``
8:
- " &7%statz_blocks_broken%"
- "Testing"```
try this
and see if it changes between them
nope doesnt work, the scoreboard just doesnt show up then
i've tried using things like - time or just time but to no avail
hmm
at the top of the config, theres this
UpdateTime: 60
maybe i need to use updatetime as a variable between them?
idk
don't think so
me neither
in the vid the kid uses time, but that also was just for text
not using a placeholder
im saying that correctly right?
- " &7%statz_blocks_broken%"
would be a placeholder?
yes
lol
nobodys ever done that before? i mean probably so with another plugin or coded, but idk
how i can use %world_time_<world>%
@nimble lava fill in a world?
yeah but if i do %world_time_myworld% or %world_time_<myworld>% nothing happens
@steep thorn
be sure to use the name of your world
im sure
I have a scoreboard that is comtieble with papi and when I write one of them in is just this text
Parse it with '/papi parse' and show the output
Because it's hard to understand what you're saying
i mean %world_time_<myworld>% is just a normal text
Do you have the necessary expansion installed?
no
I did everything like this
but %world_time_myworld% is the correct placeholder?
so it should work like that?
Show output of '/papi dump'
from the Console?
idk where the file is but this i found:
https://paste.helpch.at/raditeloku.sql
Seems like it's not loading because you don't have Vault installed
so /papi ecloud download Vault?
Hi! So, I'm working on a server in which I have to put Skript variables in a scoreboard using PlaceholderAPI. I installed the addon through ecloud and try to reload. It throws an error:
*[PlaceholderAPI] skript is attempting to register placeholders via a PlaceholderHook class which is no longer supported! *
The Skript expansion is outdated
I know there's a more updated one but idk where to get it from
its on someone's github
There is a way to make your custom PlaceholderAPI requests async?
what is wrong with my papi? Anything i try to add an expansion it says failed to find expansion with name: x
also /papi ecloud list says i have no expansions
Do you mean you're making an expansion and you want to do the replacements async?
Exactly. My customer is heavily using placeholders that need to sort lists in real time and it can cause lags.
I think it depends on which plugin is requesting placeholder replacements
Because the replacements happen on the same thread as the function that calls it
so the javascript expansion allows for arguments using _, what if I want to use another placeholder as a argument - what would the %javascript_PLACEHOLDER....% look like?
@ me
Ok.
Hello 🙂
I have a quick question, you will probably answer me! 🙂
I still have these orange lines on the console.
Thanks 🙂
[PlaceholderAPI] Loaded class net.milkbowl.vault.economy.Economy from Vault v1.7.3-b${env.TRAVIS_BUILD_NUMBER} which is not a depend, softdepend or loadbefore of this plugin. [PlaceholderAPI] Loaded class net.luckperms.api.LuckPerms from LuckPerms v5.2.49 which is not a depend, softdepend or loadbefore of this plugin. [PlaceholderAPI] listplayers is attempting to register placeholders via a PlaceholderHook class which is no longer supported!
the first two are just warnings which you can ignore, they aren't dangerous
the last one says that the ListPlayers expansion isn't compatible with the latest PAPI version
@junior musk Thank you for your feedback, but I don't have "ListPlayer" installed in PAPI: /
check your Expansions folder in your PlaceholderAPI folder
I just installed "Player" for %Player%
you should have a jar file name expansion-listplayers or something like that
remove it and reload PAPI
Oh yes! I had not updated the FTP
I do not have any error 🙂 thanks @junior musk
And also I wanted to point out that I had installed the latest "Build" version of PAPI (2.10.10 DEV - 111) and it's cool, but it shows that the plugin is not up to date and it needs to be update to 2.10.9 (earlier version)
that's probably because the updater doesn't find the update on Spigot and thus says it's outdated, but it doesn't really matter, you cna ignore it
there may be a config option in PAPI's config to disable the update msg
yes that's why
its a bit anyoing but I think you can disable it
from config.yml
I never looked tho xD
I suspect but it is displayed in the Minecraft chat, is it better to use 2.10.10 or 2.10.9?
checn_updates: in config.yml
I don't think it really matters
2.10.10 if you're on 1.16.4
also it fixed the %server_uptime% placeholder
so a few bug fixes on 2.10.10
anyway, we are notified when there is a new update on discord?
I'm using 2.10.9 in 1.16.4 and it works fine 
there's #plugin-updates
I also saw a bad ping calculation with% player_ping% on the TAB, it displays admit-have, 400ms, bah PAPI will display 4400ms, but it's random, because small pings like 20ms don't bug
whats the placeholder for players online on a diffrent server?
use the pinger_players one
haha
not sure if you can do whitelisted but online and offline can be done using the PINGER expansion
the bungee expansion is just for players amount
I don't think they made it OS actually
he does not want to load the expansion
I downloaded it I put daddy reload and nothing
papi reload
and they made it into an actual command
Ye can't find the expansion on Clip's github
Try maybe contacting him
Bueno, si descargo la expansión y nada
if I downloaded it through the console and manual pro github and nothing
?
https://pastebin.com/84ZLN6a2 what does this mean?
the ultimatestatistics Expansion is missing the getAuthor() method
ok
Can someone help me? I have this script ```var haspermission = "%prison_prisoner_prestige_prefix";
function permission() {
if (haspermission === "N/A") {
return "";
}
}
permission();``` And I want to make that whatever else comes out of the placeholder that is not N/A stays as it is! How can I do it? Else?
Hi, Pinger extension does not work when I set Firewall (port blocking outside Bungee server). How to fix it?
@twin sluice use an else statement
var hasPermission = "%prison_prisoner_prestige_prefix";
function permission() {
return hasPermission === "N/A" ? "" : hasPermision
}
permission();```
@twin sluice
if you didn't figure it out
There is no fix I don't think so. I've had to stop using it myself for the same reason
Thank you
I fixed this :)
You need to unblock connections from local IP.
If you have IP "1.2.3.4" you need to set this IP in iptables, because 127.0.0.1 is not work xd
I have a VPN or whatever its called
it goes thru a different IP at first, blocks all non player connections then connects players to my server
There are a few things I still have to try maybe it will work I just didn't worry about it
:))
ReferenceError: "hasPermision" is not defined in <eval> at line number 3```
@twin sluice,
Please respect the rules, be patient and don't ping staff members!
oh
hasPermision change it to hasPermis**s**ion
after return
var hasPermission = "%prison_prisoner_prestige_prefix";
function permission() {
return hasPermission === "N/A" ? "" : hasPermission
}
permission();```
function permission() {
return hasPermis**s**ion === "N/A" ? "" : hasPermision
}
permission();```
ok
I'm a bad explanation guy
so I did it for you
just take what I gave you
forgot an s
ok
ReferenceError: "hasPermision" is not defined in <eval> at line number 3``` still!
does %player_displayname% include the vault prefix?
no @twin sluice take my code. The one I gave above the one you sent
don't use yours because you didn't understand what I meant
Im p sure vault has their own vault placeholders
ye they do
And no this return the player display name
unless you use a plugin like essentials and you enabled it
don't think the display name will include ranks or stuff
Mhm
just their "nickname"
time to open up filezilla and look at a preexisting server
hmm
I think it does
tho
ye
some plugin is making the prefix in the displayname
ye
Essentials
that's what I said
its an option you can disable
I'm pretty sure
add-suffix-prefix or whatever its called @silver minnow
OH
THANK YOU
barry disagrees
nevermind
that's disabled by default
so that can't be the issue
😦
REALLY?
THANK YOU
you're welcome lmao
wait a second
# Disable this if you have any other plugin, that modifies the displayname of a user.
change-displayname: true
# When this option is enabled, the (tab) player list will be updated with the displayname.
# The value of change-displayname (above) has to be true.
#change-playerlist: true
# When EssentialsChat.jar isn't used, force essentials to add the prefix and suffix from permission plugins to displayname.
# This setting is ignored if EssentialsChat.jar is used, and defaults to 'true'.
# The value of change-displayname (above) has to be true.
# Do not edit this setting unless you know what you are doing!
#add-prefix-suffix: false
# When this option is enabled, player prefixes will be shown in the playerlist.
# This feature only works for Minecraft version 1.8 and higher.
# This value of change-playerlist has to be true
#add-prefix-in-playerlist: true
# When this option is enabled, player suffixes will be shown in the playerlist.
# This feature only works for Minecraft version 1.8 and higher.
# This value of change-playerlist has to be true
#add-suffix-in-playerlist: true
im confused
what do I uncomment?
k thxthxthx
do I set change-displayname: true to false too?
hmm idk what that does
ohhh
that will stop essentials from even
use setDisplayName I think
so you can
idkkkkkk
all I'm trying to do
with my plugin
is to have the prefix and all and also change player name color
😦
Hello, I wanted to ask if there is no extension of the 'Multi world Money' plugin, I want to show a scoreboard of the money in each world but I did not find any extension in eCloud.
expansion* i think
sorry, I'm using a translator 😅
okay
is there any expansion of the 'Multi world money' plugin ?
using Vault?
yes
https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Placeholders#Vault <- whole list, I recommend %vault_eco_balance_commas% though @wooden canyon
but I need him to get the money from a respective world, the % vault_eco_balance_commas% gives me the money that I have in the world I am in.
what I'm looking for is something like MWM_balance_<world> but the plugin does not have an expansion in placeholderapi
multi world money *
yess
and there is no way to create the expansion?
There probably is
I'm not 100% sure though
nope
unless
someone looks into the source code
because it doesn't have an API documentation
It's open source though
I will find some way to do it, thank you very much!
https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Placeholders, look in there for now until someone answers
🙂
I'm busy right now so I can't look 😦
Ok ty
%localtime_time% %localtime_time_<SimpleDateFormat>% %localtime_timezone_<TimeZoneID>% %localtime_timezone_<TimeZoneID>,<SimpleDateFormat>%
ooo
Found them
are you talking about irl time?
Yes
TY tho
np 🙂
What is %vault_group%
?
a placeholder that shows the group you currently have in your permissions plugin
Does it work with Pex? I have Pex installed.
I have Vault installed and its just showing me this
Do /papi ecloud download Vault
Whats an expansion that has hoverable text ?
none?
ye none
idk if there's one but be aware that if it's possible, it won't work everywhere (only in Chat and I think in books)
Is there a way to fix this?
https://gyazo.com/da640c1065238db16bbfc632b61b78df?token=5f14491f77a3f6ae823ae0d05e963161
For some reason the check item remove takes other items that arent mentioned from my inventory
Does placeholder api not work with EzRanksPro?
Why was my problem ignored?
Repeat your question because I can't see it anywhere
NEVER say 'not work', explain exactly what is happening
Never say never
My VIP kit is available 1 time in 30 days, I have a kit menu and I want it to show when it'll be available when a player put their mouse on the vip item
but the placeholder doesn't show days
it goes 23h 15m 15s
instead of 29d 23h 15m 15s
What placeholder are you using ?
Essentials
Yes
so %essentials_kit_time_until_available_vip%
@rare wave can you verify with /papi parse?
IDK if I've recommended this before but have you made sure you're using latest Dev Build of PAPI, latest release of essentials and latest version of Essentials Expansion/'
To make sure it's not because of another plugin cutting off the first part
Lord do this /papi parse me %essentials_kit_time_until_available_vip%
its not
25 days 22 hours and 55 minutes
It worked with 24 hours kit, when it goes to days, it stops working and displays 0
Paste Services
When asking for help with a config/menu/code issue please use one of these:
(However we do prefer if you used our paste :))
• HelpChat Paste - Usage
• Hastebin
Hello!
Can someone please help me make a Javascript placeholder to divide %statistic_player_kills% by %statistic_deaths%, and get the result rounded at 2 decimals in case it have?
%math_{statistic_player_kills}/{statistic_deaths}[precision:2]% try this
hopefully it wont error if you try to divide by 0 xD
Lol, it works perfect, thx dude ❤️
It will return NaN I think
Although I'm not sure if the 'precision' thing will mess it up
math expansion probably has something in place when dividing by 0 id hope
So how do I fix the issue?
if its not displaying correctly, then it must be an error with that plugin, not papi
TÜRKİSH
DeluxeMenus menü yaptım kitler için. Sonra her perme özel izin yaptım örneğin:
type: string equals ignorecase
input: '%essentials_kit_is_available_overking%'
output: 'yes'
perme sahipse "yes" sahip değilse "no " yazıyor. bunu nerede değiştirebilirim
ENGLİSH
I made the DeluxeMenus menu for the kits. Then I made a special permit for each perm, for example:
type: string equals ignorecase
input: '% essentials_kit_is_available_overking%'
output: 'yes'
It says "yes" if it has perm, otherwise "no". where can i change this
output
Hi again!
var placeholder = "%player_ping_<name>%";
function ping() {
if (placeholder >= 0 && placeholder < 150)
return "&a" + placeholder;
if (placeholder >= 150 && placeholder < 300)
return "&2" + placeholder;
if (placeholder >= 300 && placeholder < 600)
return "&c" + placeholder;
else {
return "&4" + placeholder;
}
}
ping();
```How can I make it to replace "<name>" to the argument that defines on `%javascript_ping_<name>%` when parsing?
@idle sonnet Unknown expansion.
Seems like it's using TimeUtil, I don't know much about that
Yes
timeutil shows days, hours, minutes and seconds.
example: 15d 20h 53m 23s
But I think that though essentials uses TimeUtil, it changes the way how displays on chat. LuckPerms is an example of a plugin that uses TimeUtil raw for its expiry placeholders.
So how do I fix the issue?
So I need to know how to replace "<name>" with the first argument of the javascript placeholder.
var placeholder = "%player_ping_<name>%";
```Does someone has any idea?
PlaceholderAPI.static.setPlaceholders(BukkitServer.getPlayer("playername"), "%placeholder%")
@odd jay
and replace "playername" by the player name
Hey Gab! Long time no see xd
Uh sorry where should I exactly put that?
var placeholder = "%player_ping_<name>%";
function ping() {
if (placeholder >= 0 && placeholder < 150)
return "&a" + placeholder;
if (placeholder >= 150 && placeholder < 300)
return "&2" + placeholder;
if (placeholder >= 300 && placeholder < 600)
return "&c" + placeholder;
else {
return "&4" + placeholder;
}
}
ping();
between quotes?
no, it's a method, not a string 🙃
||
||
Does the placeholder ecloud downloads reset each time?
I had installed like 4 the other day and when I turn on my server again, my deluxechat was all placeholders.
Sorry, it didn't go well, but I've been reading out on Papi's JavaScript wiki to not bother you a lot in here, and even tested using some examples in there, but still not going well
Show what you got please
var playername = args[0];
var placeholder = PlaceholderAPI.static.setPlaceholders(BukkitServer.getPlayer("playername"), "%player_ping%");
function ping() {
if (placeholder >= 0 && placeholder < 150)
return "&a" + placeholder;
if (placeholder >= 150 && placeholder < 300)
return "&2" + placeholder;
if (placeholder >= 300 && placeholder < 600)
return "&c" + placeholder;
else {
return "&4" + placeholder;
}
}
ping();
Well, you don't need the double-quotes for the getPlayer call
Because "playername" with quotes is just a constant
But I think the point that was brought up already is why are you using an additional argument?
thanks in advance for intending to help Robin!
So why %player_ping_<name>% instead of just %player_ping%?
I think when %player_ping% parses for someone offline doesn't give any value
and the first one returns "0" which I can change to "Offline" Like I did on the JS
it returns 0 for when it parses on a player that is offline
You can do that even without the additional arg
If you used %player_name%, which also works for offline players
Oh it returns empty right?=
so instead of "0" I replace it to "Offline" for when it is ""
I guess
Well if you want that specifically, check %player_online%
Not sure what it returns, but probably something you can use (a boolean)
Yeah, thats right. I'm gonna first try to remove quotes
I removed the quotes, now it is parsing but for me, I'm trying to figure out why
May it be caused by the "getPlayer"?
The javascript is named "ping"
So when I parse the placeholder for myself, with %javascript_ping_Notch% it keeps returning my ping
Notch as example)
Is there a way to replace this -> BukkitServer.getPlayer(playername) to the args[0]?
Tanguygab told something about it, but I don't know how to directly place the arg in there.
var placeholder = PlaceholderAPI.static.setPlaceholders(BukkitServer.getPlayer(args[0]), "%player_ping%");
function ping() {
if (placeholder >= 0 && placeholder < 150)
return "&a" + placeholder;
if (placeholder >= 150 && placeholder < 300)
return "&2" + placeholder;
if (placeholder >= 300 && placeholder < 600)
return "&c" + placeholder;
else {
return "&4" + placeholder;
}
}
ping();
```It is like this right now, I changed `playername` to `args[0]` and remove the playername variable. And now it parses, but only for me, when I put another name as the argument 0 of the javascript, it will keep telling my ping.
PlaceholderAPI.static.setPlaceholders(BukkitServer.getPlayer(args[0]), "%player_ping%")
argd?
args*
I don't see any differences actually
I did /papi parse me %javascript_ping_random% (random being an online player on my server) and it returns my ping, not hims
is it his real MC name or simply a nickname?
if I do /papi parse random %javascript_ping_Tomi010817% it will always give "random"'s ping
All real names.
what ping does it give?
The user I test with, usually goes at 75ms. I am going always in 200ms or around that
so when I parse for myself the javascript placeholder but specifying someone elses name, it will still display my ping
Oh wait

I'm a bit sleepy (haven't slept yet) but I think I can get to know the error
not an error
how the placeholder handles itself
%player_ping% will always return you ping on your view, even if you parse it as other player on chat I guess
maybe you have to put the var line inside the function?
I guess that the only way will by using %player_ping_<name>%
I don't think so
since you're parsing it for the other player in the script
Yes thats logically right
But I'm trying to make suppositions about what is happening with that weird placeholder lol
Wait
var kitName = args[0];
var placeholder = "essentials_has_kit_" + kitname;
var hasKit = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%" + placeholder + "%");
function hasKit(){
if(hasKit == "yes"){
return "&aTrue";
}
return "&cFalse";
}
hasKit();
```this was an interesting sample I saw on the wiki page
I could do something like "%player_ping_ + alts[0] + %
right?
The problem is that the Javascript placeholder thingy replaces "%player_ping%" before the Javascript is even ran
Can't you just trick it by doing "%player"+"_ping%"?
tf is player_ping_<name>
not sure about that as I think it didn't for me in the past when using the setPlaceholders method but may be true
Placeholder for seeing others ping
What's wrong with parseother ?
AFAIK the Javascript placeholder thing preprocesses the entire .js file before it is ran, that's why %player_ping% is replaced prematurely
I think he wants some custom colors and shit around it
Oh wait, let me process that, it may be possible I guess
But I find it weird that you would use the player name as argument
Is ping_name even a thing?
Ok
Just ask yourself 'should players be able to see other player's ping'
If the answer is no, you don't need the argument thing
Regardless of that you could still use parseother as Gaby said
With my hacky suggestion?
200iq Robin strikes again
No problem
This was actually quite similar to a CTF challenge I had recently
Where there was a blacklist for certain words in a python script
And you had to concatenate the characters to bypass that
I'm still surprised on how you managed to figure that out
Hey! So how could I replace the value for the placeholder when it is null?
I thought I could replace it with "", but didn't work, it breaks the JS
@odd jay can you show what you've tried?
Hoi there. Does anyone know a placeholder for your unique#? As in your join #. As in you were player number #n
u would probably have to store that data in a js placeholder (or a full expansion), of which i dont know about
True. But my servers already been up for a while and I wanted to pull data from dat/essentials files.
Unfortunately essentials unique placeholder is global.
yea idk if essentials stores that kind of data
Yup. player doesnt seem to have a placeholder for it either.
Well I guess its time to move on. Thanks!
Yes, this is how the placeholder is going:
var placeholder = PlaceholderAPI.static.setPlaceholders(BukkitServer.getPlayer(args[0]), "%player" + "_ping%");
function ping() {
if (placeholder >= 0 && placeholder < 150)
return "&a" + placeholder;
if (placeholder >= 150 && placeholder < 300)
return "&2" + placeholder;
if (placeholder >= 300 && placeholder < 600)
return "&c" + placeholder;
if (placeholder >= 600)
return "&4" + placeholder;
}
ping();
```So when the args[0], is an online player, it correctly gives you the ping of that player. But when the player defined is Offline, it will return empty. So I wanted to change that empty value to something else, but the JS just breaks when you try to do it, so I think another way is needed for that.
var placeholder = PlaceholderAPI.static.setPlaceholders(BukkitServer.getPlayer(playername), "%player" + "_ping%");``` why?
why not just var placeholder = "%player_ping%"
?
also
var placeholder = parseInt("%player_ping%")
Because I'm using the placeholder to detect the first argument on the JS, so you can see others ping
this would work to only know your ping
I updated the JS, I removed the unnecessary "playername" variable
and added the args[0] directly
I will check, brb
and you can use parseOther to see other's ping
Nop, there isn't colored ping, anyways, I would love to make that work (which is already working, but only the Offline thing is left yet) since I could do much more decorative and dope stuff with it.
isn't there
I will make a test with parseOther, brb
a method to check if player is online
I think its just Player#isOnline
Yes, thats rightm, not sure about that hashtag
@odd jay %player_colored_ping%
it is a thing
just not how I thought its going to be named
and you can change the colors in the config.yml I think
Gonna check that out too, sorry for the missknowledge
I mean that's why we're here. To help
Oh at the end I could change the colors of it but not on where numbers to get changed. Also if I wanted to do it with JavaScript to change that, it would finish happening the same as before. And everythingg is already working good with the placeholder that I showed above, the only thing is to make the Player.isOnline check and do that detail, and I guess it would be done
"it would finish happening the same as before" since I would also have to use the arguments on the javascript and all that, which is already working on the previous one
Also, if I get to made it to solve the placeholder I sent previously, it would really help me a lot for the next placeholders I'm making.
Sorry, so what should I use to check if "args[0]" is online?
you probably want to do something like this: ```
var player = BukkitServer.getPlayer(args[0])
if (!player.isOnline()) "TEXT TO BE WRITTEN IF PLAYER IS OFFLINE"
no need for return or anything just that
Oh, looks great
var placeholder = PlaceholderAPI.static.setPlaceholders(BukkitServer.getPlayer(args[0]), "%player" + "_ping%");
var player = BukkitServer.getPlayer(args[0])
if (!player.isOnline()) "&7¡Offline!"
function ping() {
if (placeholder >= 0 && placeholder < 150)
return "&a" + placeholder;
if (placeholder >= 150 && placeholder < 300)
return "&2" + placeholder;
if (placeholder >= 300 && placeholder < 600)
return "&c" + placeholder;
if (placeholder >= 600)
return "&4" + placeholder;
}
ping();
```Tried it like that, and it happens te same apparently, the JS breaks. It will just send the raw javascript placeholder when you parse it.
Oh wait
I forgot something I guess
Nope, still the same
Wait again, I think I got it actually
if he's online or not
so it will look like this:
var player = BukkitServer.getPlayer(args[0])
if (!player.isOnline()) "&7¡Offline!"
var placeholder = PlaceholderAPI.static.setPlaceholders(player, "%player" + "_ping%");
since you don't need to get the player again
if (placeholder >= 0 && placeholder < 150)
return "&a" + placeholder;
```It is caused by that `>= 0`, apparently it detects empty as 0, I will change it to `> 0` and then put the offline message specifically for 0
that method is actually well done though, but the problem was on another part I guess, let's test it, brb
kk
Well, it keeps breaking, but I know for certain that the problems comes because when the player is offline, it returns like an invisible 0
var placeholder = PlaceholderAPI.static.setPlaceholders(BukkitServer.getPlayer(args[0]), "%player" + "_ping%");
function ping() {
if (placeholder >= 0 && placeholder < 150)
return "&a" + placeholder + "&8ms";
if (placeholder >= 150 && placeholder < 300)
return "&2" + placeholder + "&8ms";
if (placeholder >= 300 && placeholder < 600)
return "&c" + placeholder + "&8ms";
if (placeholder >= 600)
return "&4" + placeholder + "&8ms";
}
ping();
```So when I parse this, for an offline player. It will return "&a&8ms"
when I did > 0 instead of >= 0, it would return nothing
but it would still work
Same here, Idk if its even possible to change a null value... but. Is there a way to change that "&a&8ms"?
If there is, I think it could get solved
Yeah no problem at all, it already helps me a lot discussing this here, I learn lol
try ```js
var placeholder = PlaceholderAPI.static.setPlaceholders(BukkitServer.getPlayer(args[0]), "%player" + "_ping%");
function ping() {
if (placeholder == 0)
return "Offline"
if (placeholder > 0 && placeholder < 150)
return "&a" + placeholder + "&8ms";
if (placeholder >= 150 && placeholder < 300)
return "&2" + placeholder + "&8ms";
if (placeholder >= 300 && placeholder < 600)
return "&c" + placeholder + "&8ms";
if (placeholder >= 600)
return "&4" + placeholder + "&8ms";
}
ping();```
try this
it breaks when you do "placeholder == 0"
It will always show the raw javascript placeholder when you parse it
I see so if you just change it to > and don't use = at all
it will work?
even if the player is missing?
wait
wait
lets debug first
lets see what it actually happens
yes it will work. And if the player is offline it will show "" literally
try just this: js var placeholder = PlaceholderAPI.static.setPlaceholders(BukkitServer.getPlayer(args[0]), "%player" + "_ping%"); placeholder
this is the entire cod
code*
like remove everything else including function and all that
Alright
and see what happens when you parse the placeholder for an online player
and for an offline player
I think its because I'm not telling the JS placeholder to return nothing
the only thing written rn is the variable
Yup
I think I should add a function and put it to return "placeholder" right?
var player = BukkitServer.getPlayer(args[0])
var playerName = player.getName()
playerName``` try this code please
