#placeholder-api
150650 messages · Page 14 of 151
what the hell are you trying to do lol
the world placeholders take the world name as one of the "arguments"
For example %world_difficulty_<world>%
I'm trying to display the status of a server in my BungeeCord "network"
why is network quoted
because I don't like calling a BungeeCord implementation a "network" when it's an application gateway/proxy
@austere hawk awesome thanks, that should do what I need
I saw the expansions for Server, Bungee, RedisBungee and was beginning to think I had to hack something together to make it work. Glad to know there is a pinger to help with that. Thanks!
np!
@mint fable that depends on how you define network
there are many ways
but this one a group or system of interconnected people or things.
it is that
point taken
I mean, BungeeCord itself is a proxy software that allows you to create a network of servers
¯_(ツ)_/¯
yeah my day job is in IT though and has a lot do with networking, so I've just gotten in the habit of "you only call it a network if it's routable"
mostly because our environment has us stacking 20+ VLANs across multiple top-of-rack switches, so saying something like "is the network up" is very, very ambiguous
stupid question time: does /papi cmdparse work when executed from a command block?
If so, do I need to supply a target?
/papi parse <target> <placeholder>
is /papi cmdparse a thing? or did you mean that ^
(<target> can also be me)
According to the wiki it is
pretty much, I guess
if it wasn't clear, target is required
so when target is 'me', is it targeting a player or the entity that executed it?
hrm ok. So if I wanted to send a redstone signal when the pinger expansion reports a server as online, what would be the best avenue to accomplish this?
how are you planning on sending the redstone signal
Depends on my options. I was thinking easiest method was replacing a filler block (stone atm) with redstone block
uh
this seems like a custom plugin
you want to do a command based on the return of a placeholder
that's what I was afraid of
probably updating every minute or so
now
you might be able to do it using javascript
if you want to use commandblocks
just use any player as the target
same way people do random commands for deluxemenus
they parse the javascript placeholder, and it would return a random string
except you want to return a certain command
based on the placeholder return
im not sure how to fix this but my firewall is blocking the %pinger_online_ipaddressofserver%
lol
if the servers are connected with bungeecord, try using the bungee placeholders
i only see two, total and servernam
😛
the bungee placeholders are for playercount lol
yeah the bungee placeholder aren't much help
yeah i just added a firewall and now any server status just say offline
hello I have an issue
[01:06:55 WARN]: [PlaceholderAPI] File: permission.js for javascript placeholder: permission is empty
``var hasfaction = "%clans_clan_tag%";
function permission() {
if (hasfaction === "") {
return "";
}
else {
return "&a%clans_clan_tag% &8&l┊";
}
}
permission();``
I have it on 2 servers, on first one it works, on the second one I receive this error
anyone can help me with that?
hello I have an issue
@velvet tinsel Probably the "┊" is causing it. Use the unicode \u<number here> instead
It's \u250A
thanks a lot 😄
@velvet tinsel Np, anytime 🙂
Hello!
Is there a placeholder like %vault_eco_balance% but rounded at 2 decimals? If there isn't, can someone please help make a javascript for that? Thanks in advance
Mm
None of them are cutted at 2 decimals
Formatted works with letters
Fixed doesnt have decimals
Commas neither
Hey, I need a bit of help in regards to PAPI, it seems to be not working on my server atm, if I could be dm'd ASAP that'd be great.
"Not working", would be easier if you provided some more details
Literally no placerholders will work on my server in regards to scoreboard/playerlist
And what version are you using?
Did you downlod relevant expansion
wdym
papi ecloud download
scoreboard
playerlist
or objective maybe
let me check
/papi ecloud download ScoreboardObjectives
/papi ecloud download PlayerList
/papi reload
didnt work
@heady falcon
To be exact
I have the plugins: PlayerListPlus
And Scoreboard
plugins or papi expansions?
oh
do you mean you are using the placeholders in those plugins? I think I mis understood
what placeholders are you trying to use?
Does PAPI work in books?
I'm using an external tool to author a book. I just wanted to know if Placeholders work?
I'm tryna use scoreboard and playerlist ones
Are others working?
literally 0
Nofyr, I use placeholders on the plugin "InteractiveBooks" and they seem to work perfectly
I'll look into it, thanks @odd jay
Thats an L
creepvr
Have you downloaded the player expansion?
do /papi ecloud download Player
There's expansions? o_o
There's expansions? o_o
Should probably read the plugin page
Hello!
Is there a placeholder like %vault_eco_balance% but rounded at 2 decimals? If there isn't, can someone please help make a javascript for that? Thanks in advance
Frosty, any idea about this? Im sure there was a way to modify the vault placeholder, tho Im not sure if there is a way to achieve that
sure!
I have one more question... These expansions are for their respective plugin names?
Some, some are standalone
195 pages Frosty. Is there a list of standalones?
Doubtful, why would you need a list?
To prune what I will use and not miss out on what I need.
But if I gotta go through 195 pages to do that, I'll do it.
It's kinda just, give an example of what you're trying to achieve and someone will tell you if a placeholder exists for it/what expansion you should be looking at (unless you wanna look through all of them yourself)
I wanna know what kind of things there are available as I am still concepting the whole scheme in phases of whether or not it's plausible to do at the stage of development.
Up to customizing everything.
Past Config, and Ranks/Roles & Perms.
Well I mean two most common ones you're gonna want to look at are player and vault expansion, the rest is just preference in most cases
Thank you very much.
Is there a command to see all active expansions+base placeholders in a list?
Like a tree command?
Frosty, any idea of why is it rounding at the first decimal having 2 as precision but not rounding at the second decimal?
example: if you have 0.86342 then it will round to 0.90 and not to 0.86
Yea you're gonna have to use JS if you want it precise
sure, thanks
I think I've made one for that before, just cba to find it 
hey
just wanted to state this
do not use /papi ecloud download vault
it is broken
when doing so your essentials userdata file gets filled with offline uuids and it breakes /bal /seen for offline players
do not use /papi ecloud download vault
shoot, Im pretty late i guess
I got thousands of offline uuids files and couldn't figure it out just figured it out on a dummy server
so yeah
lmao what
What are you on about lol
ok basically
essentials has a userdata file
when you do /papi ecloud download vault
latest 2.10.9
`>.... [14:14:27 INFO]: [Essentials] Creating empty config: /home/container/plugins/Essentials/userdata/a3233515-2791-30e0-87a6-fef7ff7afa4e.yml
.... [14:14:27 INFO]: [Essentials] Creating empty config: /home/container/plugins/Essentials/userdata/65b1ccc3-da66-3dc6-99b9-47a077e7681a.yml
.... [14:14:27 INFO]: [Essentials] Creating empty config: /home/container/plugins/Essentials/userdata/a75681d0-45cb-3e17-9bae-bcda01f54c16.yml
.... [14:14:27 INFO]: [Essentials] Creating empty config: /home/container/plugins/Essentials/userdata/dc485dd8-2348-3759-83af-ed27dbc69f30.yml
.... [14:14:27 INFO]: [Essentials] Creating empty config: /home/container/plugins/Essentials/userdata/bf613d5a-386d-3862-a750-525bcecbfdb3.yml `
it will create empty config files that are offline mode
2.10.9 is the latest version
potentially breaking peoples economy if they leave/join for a couple of days
sry, 2.10.9
And what server version?
what essentials version
as far as I am aware it brakes on all of them since I updated essentials a couple of times and latest version still brakes
but I think this might only be issue for a proxy server
since papi is looking at an "offline server"
while essentials takes uuids as an online server
you can test it on an empty server install "essentialsx, vault, placeholderapi" and do /papi ecloud download vault it should create a duplicate of your offline uuid with the following folder
npc: true lastAccountName: infinite_mist money: '0'
testing rn
Hi,
The following line does not replace &r with §r. What can I do about that?
PlaceholderAPI.setPlaceholders(event.getPlayer(), "%luckperms_prefix%%1$s&r: %2$s");
It works if I add a space before &r like: %1$s &r.
Why use that symbol
Just because I use it in a lot of other places and it would be a bit weird to make an exception.
Frosty figured it out got my whole server working again
Also this might be a wrong behavior
without including /papi ecloud download vault
all players can /seen now /bal and everything works as it should without it
@mortal valley Tested it out, it generated 1 config, but from what I can see it's essentials itself doing that
Well I mean would kinda be cucking around 60% of servers if it were validating uuids
Frosty
I could make it, but only with 0 as no decimal value
when it is another number, it wont show decimals
I will post the js on a hastebin, brb
Hi, how can I shorten a placeholder? %koth_points_1_amount% as an example takes up too much space on my FeatherBoard
https://hastebin.com/ixupizeyef.js
So everything is ok, the only thing is that I thought that for example ".455" would ignore the no decimal numbers, but it take it as "0"
So how could I make that JS to happen on all the numbers?
Jesus
doesnt matter how it looks, its all on the flavour
xD
var balance = "%vault_eco_balance%";
function formatBalance() {
var split = balance.split(".");
if (split.length != 2) {
return balance;
}
var result = split[1].substring(0, 2);
return split[0] + "." + result;
}
formatBalance();
Probs cleaner ways, but it works just fine
sure! gonna test it out
Great frosty! Thanks a lot, works great.
It is much more cleaner for sure, mines look like a sopa do macaco.
I learned a useful thingy with your JS: the .split
Anyways, though it doesnt round and it only truncates, Im totally satisfied with it 👌
Does anyone know why the skript expansion isn't working and not showing in /papi list?
I downloaded it multiple times, via the ecloud and manually
How can I shorten a placeholder? %koth_points_1_amount% as an example takes up too much space on my FeatherBoard. I would like to change it into something like k_p_1_a
javascript
Sorry, could you elaborate?
best you can get %javascript_k%
function shorten() {
return "%koth_points_1_amount%";
}
shorten();
wheres the rust parser?
rsut
Did anyone know how to fix what I'm experiencing? I wrote it a few messages ago
How do I ensure that I can connect the server to: api.extendedclip.com/v2
I cant use the download command for API to download the nescessary extensions for Deluxechat. I had to try and manual download but not all worked.
My host says they have not recieved any error for connection.
They said nothing is stopping it from connecting
Can i ask what have been changed on placeholderapi? since placeholders arent registering anymore
some methods were removed in 2.10.7 but i believe theyre all back in 2.1.0.9
I have 2.10.9 but my hook doesn seem to work anymore.
what methods are u using?
i believe registerPlaceholderHook mightve been removed
i believe u should use super.register() now
also onPlaceholderRequest was deprecated last time i checked, the new version is onRequest(OfflinePlayer, String)
ok thanks that worked.
👍
Hello guys please, there is a placeholder that can we use to show " The cooldown of kit in chestcommands "
A placeholder that shows " the cooldown of the kit" in a gui ( chestcommands )
what kit plugin are u using?
%essentials_kit_time_until_available_<kitname>% i believe
.-papi <expansion> 🙂
np
?imgur
so u have Holographic displays, holographic extension and protocollib?
No :/
ok better question sorry, which hologram plugin are u using?
Hi guys, I'm getting this error while running the latest PlaceholderAPI
@warm topaz Ok working 🤦 . I must install holograpic extension and portocolib
@late glacier i believe this was fixed in the dev builds https://ci.extendedclip.com/job/PlaceholderAPI/ please try it
@warm topaz Why add to holograms {slow}, {medium}, ec?
its how holographic extension knows to update the hologram, otherwise the plugin has no idea how to update the hologram (then ur placeholder will not work)
👍
[05:37:58 WARN]: [PlaceholderAPI] mvdw is attempting to register placeholders via a PlaceholderHook class which is no longer supported!
I'm trying to install the ecloud expansion for MvDWPlaceholder api. I'm running /papi ecloud download MVdW then /papi reload and its still not coming up on the installed expansions list. one moment let me get you that
no they don’t
what if you try on 2.10.8?
I'm going to be going to bed im a minute. I'll try it out tomorrow morning and get back to you. thanks for the help
👍
is there a way to get %player_first_join_date% without the timestamp
just date
EDIT: realized that i could change the date formatting in the config and remove the timestamp 🙂
is there any reason why my pinger holograms dont update until you quit the server then rejoin the server?
Does anyone know why my skript expansion doesn't work? It doesn't show in /papi list either
Hi, I need help with Parseother on Javascript Expansion. When I try to use parseother on a variable, It parses the placeholder (The one without percent sign) first before being parsed as parseother placeholder. For example,
var ParseOther = "%parseother_{" + OnlineNames[z] + "}_{worldguard_region_name}%";```
It parses first the "`worldguard_region_name`" ending up messing the parseother. If I am on region "Craft" It will return as `%parseother_{craftizz}_{craft}%` instead of `%parseother_{craftizz}_{worldguard_region_name}%`
Does anyone know why my skript expansion doesn't work? It doesn't show in /papi list either
@stiff marlin Go toplugins/PlaceholderAPI/expansionsand check to see if the Skript expansion is there. If it is then delete it then go to https://api.extendedclip.com/expansions/skript/ and download the expansion then go and add it manually in theplugins/PlaceholderAPI/expansionfolder
I already downloaded it via the ecloud and manually
yeah, wait a sec
Can I just copy the placeholderapi information that is coming in the console?
but yeah, wait a sec, I'll provide the startup log
My server has been running all night, so there might a be a lot in it (link deleted)
ugh is this all?
It doesn't seem like the startup is in that log, I'll restart my server quickly and provide you with a new log
Can I send it in DM then?
I already have the link no need to resend it
But I don't think the startup is provided there
and if you'll restart usually there shouldn't be any IP unless someone has joined
I'll restart then
well it should. idk why it didn't for you
10.08 14:54:37 [Server] INFO [PlaceholderAPI] Successfully registered expansion: askyblock
10.08 14:54:37 [Server] WARN [PlaceholderAPI] skript is attempting to register placeholders via a PlaceholderHook class which is no longer supported!
10.08 14:54:37 [Server] INFO [PlaceholderAPI] Successfully registered expansion: vault
10.08 14:54:37 [Server] INFO [PlaceholderAPI] Successfully registered expansion: luckperms
10.08 14:54:37 [Server] Startup 3 placeholder hooks successfully registered!```
I found that in the console
yeah
so you'll have to contact whoever is the developer of Skript expansion and ask them to update
Okay, thanks.. I'll try contacting them
How do I do that?
Oh, thanks
but you could just try mesaging the dev first
Yeah I'll message the dev
no problem
getting this error when I run reload https://paste.helpch.at/otowevutoq.md
discordsrv expansion fails to load, outdated. Latest placeholderapi, latest discordsrv
deleted expansion and used ecloud download again, doesnt fix
Hi i have a bug i think...
I added on my scoreboard %statistic_time_played% and now i have 3d 25h 36m and 33s
Then all the other, updated ones will break lol
Hi. I was wondering if there's any placeholder that's related to nicknames, but that the type of placeholder isn't a word, but instead a sentence, so that one can input the information in the placeholder with spaces in it
@austere hawkThe eCloud is currently non responsive, please report this to staff in https://helpch.at/discord
You suck papi bot
xD
I mean- Is there any plugin that integrates a placeholder that can contain spaces in them?
yay Im green
anyone know why griefprevention isnt working with papi?
https://github.com/Kqliber/Expansions/releases can u try this please? put the jar in /plugins/placeholderapi/expansions
Does anyone know if there is a placeholder for blocks placed in placeholderapi? I can't seem to find it.
Is there a way to unregister a hook?
Does anyone know if there is a placeholder for blocks placed in placeholderapi? I can't seem to find it.
@coarse sable probably statistic
Already checked.
%statistic_use_item:<Item Material>%
I added on my scoreboard %statistic_time_played% and now i have 3d 25h 36m and 33s
Its a bug?
i saw this in a server and they have a status of whitelisted. is that from the pinger placeholder or is that custom coded
@shell aspen explain the actual bug, I don't see what's wrong with that
Or ya know, just ask the question and someone will respond if they know the answer
Help?? placeholderapi allo lowercase
Why is everything lowercase on new placeholderapi version?
is there a way in javascript to turn 1,0 to 1 but 1,1 is still 1,1?
explain the actual bug, I don't see what's wrong with that
@steep thorn why i have 3d and 25h and not 4d???
uh
Oh
is new placeholderapi broken?
@shell aspen which PAPI version?
Placeholder 2.10.9
I have 2.10.9
This is definitely wrong
I have 2.10.9 and is your stuff all lowercased too?
Why is my PlaceholderApi all stuff is lowercased ?
No my stuff isn't lowercased just doesn't calculate time well
I used placeholderapi 2.10.9 and everything is lowercased
my chat, my announcements,
my ranks
@shell aspen update to the latest dev build
whats latest dev build?
can u send it?
^
I will try
@steep thorn that was actually the fix for that bug lol (and the whole class refactoring) it's not in the latest release tho
Alright, let's see if that fixes @shell aspen 's issue
Should, it fixed mine
fefo did u see my screenshot?
Yep
Sorry, but I'm checking tomorrow, I'm not at the computer now
I have a feeling that's in a config file in the clearlag plugin you're using (I never used any so I wouldn't know)
But I don't know for sure tho
Also, question: which parts of those messages come from placeholders?
I'm assuming the remaining time and # of entities cleared?
no its for every plugin
bruh
announcer, essentialschat, and stuff
then you got bigger problems, does it still happen without papi?
deluxe menu not support for 1.16 ?
never heard of such thing
i guess ill just use 1.8 placeholderapi
thats only one that works for 1.16.1
should i try reset full server and try it?
make backups first lul
How do i fix it?
I have absolutely no idea, did you try with the latest dev build?
This is bad, the version of Statistic that worked with older Spigot versions, doesn't work with newer PlaceholderAPI versions
This version
https://api.extendedclip.com/expansions/statistic/versions/statistic-200/
The new version seemingly works with everything? In that case the wiki should be updated
Sergiu be writing down the bible or somethin
var kitname = args[0];
var perm = "%essentials_has_kit_" + kitname + "%";
var status;
function kitcheck() {
if (kitname !== null && kitname !== "" && kitname !== undefined) {
result = perm.indexOf("✔");
if (result !== -1) {
status = "&a✔"
}
status = "&c✘"
} else {
status = "&e?";
}
return status;
}
kitcheck();
when i'm using %javascript_kits_vip% it doesnt work, it shows as ✘, the problem is with perm with kitname but when i'm using kit name instead eg. perm = "%essentials_has_kit_vip%"; its working
why?
Sergiu be writing down the bible or somethin
@austere hawk yeah :)))))))
someone tag me with solution please 🥺
ugh because perm will bot be parsed as a placeholder
try PlaceholderAPI.setPlaceholders(player, perm) and give player the %player_name% value
so something like this ```
var kitname = args[0];
var perm = "%essentials_has_kit_" + kitname + "%";
var player = "%player_name%";
perm = PlaceholderAPI.setPlaceholders(player, perm);
var status;
function kitcheck() {
if (kitname !== null && kitname !== "" && kitname !== undefined) {
result = perm.indexOf("✔");
if (result !== -1) {
status = "&a✔"
}
status = "&c✘"
} else {
status = "&e?";
}
return status;
}```
thank u ❤️
does it work?
uhmm...https://prnt.sc/txd4s4
nope
[23:17:34 WARN]: Caused by: <eval>:1 TypeError: PlaceholderAPI.setPlaceholders is not a function
brb
can u use that in js?
I'm pretty sure that Frosty used it to help with a js of Tanguygab's
actually @junior musk could you help? xD
;((
@brisk coral you online? If not sorry for pinging xD
but why it doesnt work then?
var kitname = args[0];
var perm = "%essentials_has_kit_" + kitname + "%";
var status;
function kitcheck() {
if (kitname !== null && kitname !== "" && kitname !== undefined) {
result = perm.indexOf("✔");
if (result !== -1) {
status = "&a✔"
}
status = "&c✘"
} else {
status = "&e?";
}
return status;
}
kitcheck();
when i'm using %javascript_kits_vip% it doesnt work, it shows as ✘, the problem is with perm with kitname but when i'm using kit name instead eg. perm = "%essentials_has_kit_vip%"; its working
why?
he's trying to use a variable inside the placeholder
yep
?
var kitname = args[0];
var perm = "%essentials_has_kit_" + kitname + "%";
var status;
function kitcheck() {
if (kitname !== null && kitname !== "" && kitname !== undefined) {
result = perm.indexOf("✔");
if (result !== -1) {
status = "&a✔"
}
status = "&c✘"
} else {
status = "&e?";
}
return status;
}
kitcheck();
ok
can you return perm?
okkkk
I'm pretty sure it will just return the text but yeah return it just in case xD
ugh?
why are you checking for a check mark?
where did that come from? xD
oh xD
I see
so it parses the placeholder
yep
so the placeholder works fine
its just inside the javascript
it only parses it when you do the command
so you need to parse it inside first to make the check
var perm = "%essentials_has_kit_" + kitname + "%";
with
var perm = "%essentials_has_kit_vip%";
can you type /papi parse me %essentials_has_kit_vip%
BlitzZ, you needed me?
https://prnt.sc/txe7iv this is that checkmark
ye
how did you fix the placeholder with a variable inside it/
I remember frosty doing it for you
okay so
PlaceholderAPI.static.setPlaceholders(player, "placeholder");
var kitname = args[0];
var perm = "essentials_has_kit_" + kitname + "";
var status;
function kitcheck() {
if (kitname !== null && kitname !== "" && kitname !== undefined) {
result = perm.indexOf("✔");
if (result !== -1) {
status = "&a✔"
}
status = "&c✘"
} else {
status = "&e?";
}
return perm;
}
kitcheck();
what does that return
Hi quick question, what is PlaceholderAPI used for?
huh?
that's what I want to figure out
Try what tanguygab sent
ok
even if it returned %essentials_has_kit_vip% blitz it should say yes
var perm = "essentials_has_kit_" + kitname + "";
:L
yes...
I did that on purpose
because I wanted to see the value of it
and make sure it was correct
no it shouldn't say yes
because then it makes no sense for it to be say no
it does make perfect sense
what
why does it say no?
the string inside the js would be the following
%essentials_has_kit_vip%
not parsed
yeah
if it returns that
papi will parse it
so why does it return no
it should return the check mark
yep
it makes no sense to return no
hmm that's weird didn't see the other part of the test
did you parse it on yourself both times sergiu?
when its vip instead + kitname + its working but when its viceversa its doesnt
can you send the js you have now?
just send the entire thing
var perm1 = "%essentials_has_kit_" + kitname + "%";
var player = "%player_name%";
val perm = PlaceholderAPI.static.setPlaceholders(player, perm1);
var status;
function kitcheck() {
if (kitname !== null && kitname !== "" && kitname !== undefined) {
result = perm.indexOf("✔");
if (result !== -1) {
status = "&a✔"
}
status = "&c✘"
} else {
status = "&e?";
}
return status;
}``` try this after that
var kitname = args[0];
var player = "%player_name%";
var perm = "essentials_has_kit_" + kitname + "";
perm = PlaceholderAPI.static.setPlaceholders(player, perm);
var status;
function kitcheck() {
if (kitname !== null && kitname !== "" && kitname !== undefined) {
result = perm.indexOf("✔");
if (result !== -1) {
status = "&a✔"
}
status = "&c✘"
} else {
status = "&e?";
}
return perm;
}
kitcheck();
oh
var kitname = args[0];
var perm1 = "%essentials_has_kit_" + kitname + "%";
var player = "%player_name%";
val perm = PlaceholderAPI.static.setPlaceholders(player, perm1);
var status;
function kitcheck() {
if (kitname !== null && kitname !== "" && kitname !== undefined) {
result = perm.indexOf("✔");
if (result !== -1) {
status = "&a✔"
}
status = "&c✘"
} else {
status = "&e?";
}
return status;
}
yep, same error
it will return the X
yep
it should even throw errors
it will return only if the player doesnt have permission
well no
because its a random else in there
bruh
that else doesn't come after the if ...
wait can you do that?
var kitname = args[0];
var perm1 = "%essentials_has_kit_" + kitname + "%";
var player = "%player_name%";
val perm = PlaceholderAPI.static.setPlaceholders(player, perm1);
var status;
function kitcheck() {
if (kitname !== null && kitname !== "" && kitname !== undefined) {
result = perm.indexOf("✔");
if (result !== -1) {
return "&a✔";
}
return "&c✘";
} else {
return "&e?";
}
}
try that
what are you on about
cj ...
blitzz look
if (kitname !== null && kitname !== "" && kitname !== undefined) { }else
:))
if (kitname !== null && kitname !== "" && kitname !== undefined) {} status = "&c✘" { }else
that's how it is
what
are you even
bruh
i can't
let's do this
function kitcheck() {
if (kitname !== null && kitname !== "" && kitname !== undefined) {
result = perm.indexOf("✔");
if (result !== -1) {
return "&a✔";
}
return "&c✘";
} else {
return "&e?";
}
}
😦
so what I've sent doesn't fix it Sergiu?
nope
var kitname = args[0];
var perm1 = "%essentials_has_kit_" + kitname + "%";
var perm = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, perm1);
function kitCheck() {
if (kitname !== null && kitname !== "" && kitname !== undefined) {
result = perm.indexOf("✔");
if (result !== -1) {
return "&a✔";
}
return "&c✘";
} else {
return "&e?";
}
}
kitCheck();
ok
that should work
and no, val is wrong
good lookin
oh
it might accept a player though instead of a player name
val is a thing just in the new versions or something of javascript I think
ooh
i think I forgot the bottom at some point
call the function
ah, I copied blitz that's what happened
😉
blame me ... nice
xd
well I know
but you could just own your mistake
that you didn't look to what you copied
psshhh
xd
var kitname = args[0];
var perm1 = "%essentials_has_kit_" + kitname + "%";
var perm = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, perm1);
var status;
function kitcheck() {
if (kitname !== null && kitname !== "" && kitname !== undefined) {
result = perm.indexOf("✔");
if (result !== -1) {
status = "&a✔"
}
status = "&c✘"
} else {
status = "&e?";
}
return status;
}
i tried this
but still NO
uh
but why no
var kitname = args[0];
var perm1 = "%essentials_has_kit_" + kitname + "%";
var perm = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, perm1);
function kitCheck() {
if (kitname !== null && kitname !== "" && kitname !== undefined) {
result = perm.indexOf("✔");
if (result !== -1) {
return "&a✔";
}
return "&c✘";
} else {
return "&e?";
}
}
kitCheck();
it returned... NO?
O.o
bad blitz
:((
no point in holding your return in a variable so it takes more time to do nothing
okay let's see
var kitname = args[0];
var perm1 = "%essentials_has_kit_" + kitname + "%";
var perm = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, perm1);
function kitCheck() {
if (kitname !== null && kitname !== "" && kitname !== undefined) {
result = perm.indexOf("✔");
if (result !== -1) {
return "&a✔";
}
return "&c✘";
} else {
return "&e?";
}
}
kitCheck();```
let's take a look
can we return perm1 and perm?
lets try
ok
var kitname = args[0];
var perm1 = "%essentials_has_kit_" + kitname + "%";
var perm = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, perm1);
function kitCheck() {
if (kitname !== null && kitname !== "" && kitname !== undefined) {
result = perm.indexOf("✔");
if (result !== -1) {
return "✔";
}
return perm + " " + perm1;
} else {
return "&e?";
}
}
kitCheck();
okay let's test this
😦
fuck i got no idea
vip instead kitname?
var kitname = args[0];
var placeholder = "essentials_has_kit_" + kitname + "";
var perm = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%" + placeholder + "%");
function kitCheck() {
if (kitname !== null && kitname !== "" && kitname !== undefined) {
result = perm.indexOf("✔");
if (result !== -1) {
return "✔";
}
return perm + " " + placeholder;
} else {
return "&e?";
}
}
kitCheck();
hmm
what is your current js then
idk how
var kitname = args[0];
var placeholder = "essentials_has_kit_" + kitname + "";
var perm = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%" + placeholder + "%");
function kitCheck() {
if (kitname !== null && kitname !== "" && kitname !== undefined) {
result = perm.indexOf("✔");
if (result !== -1) {
return "&a✔";
}
return perm + " " + placeholder;
} else {
return "&e?";
}
}
kitCheck();
so you copied my stuff and colored it
yep
I would assume it works without coloring it?
yep
ok thanks you very much, you're my hero :))
I kind of am hurt, because I wanted to try that way earlier but didn't 
?
blitz thank you too
what if I don't want to?
🥺
ok
var kitname = args[0];
var perm;
var perm1;
var time;
var time1;
var available;
var available1;
var result;
var status;
perm1 = "essentials_has_kit_" + kitname;
time1 = "essentials_kit_time_until_available_" + kitname;
available1 = "essentials_kit_is_available_" + kitname;
perm = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%" + perm1 + "%");
time = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%" + time1 + "%");
available = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%" + available1 + "%");
function kitcheck() {
if (kitname !== null && kitname !== "" && kitname !== undefined) {
result = perm.indexOf("✔");
if (result !== -1) {
if (time == 0) {
status = available;
} else {
status = time;
}
} else {
status = perm;
}
} else {
status = "&e?"
}
return status;
}
kitcheck();
This is my final code
and its working
:))
uh
i kept that status :))
you don't need to do the variables like that
Hey, i got a question with javascript placeholders
var towny = "%townyadvanced_town%";
function getTownName() {
if (towny === "") {
return "None";
} else {
return towny;
}
}
getTownName();
``` is not giving anything in return
Try parse the placeholder to see what it returns
thats what i was doing
i just realized i made a typo so you may ignore me lol
thanks tho!
👍
I want to update my expansion but can't seem to see the link to do so
go to versions
don't seem to be there or working
tried downgrading to 2.10.8 and same issue is still occuring
[04:13:05 WARN]: [PlaceholderAPI] mvdw is attempting to register placeholders via a PlaceholderHook class which is no longer supported!
@mint fable
@sinful plume,
Please someone help
with?
how can i make my config work with any placeholder
Is it your own plugin or another plugin?
Ive done that
It doesn't show me how to make all my stuff in config placeholders
You want to make your own placeholders?
if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
/*
* We register the EventListener here, when PlaceholderAPI is installed.
* Since all events are in the main class (this class), we simply use "this"
*/
Bukkit.getPluginManager().registerEvents(this, this);
} else {
/*
* We inform about the fact that PlaceholderAPI isn't installed and then
* disable this plugin to prevent issues.
*/
getLogger().warn("Could not find PlaceholderAPI! This plugin is required.");
Bukkit.getPluginManager().disablePlugin(this);
}
}
like... what am i meant to do with this
Well, do you know java?
ish
Learning
String joinText = "%player_name% &ajoined the server! They are rank &f%vault_rank%";
/*
* We parse the placeholders using "setPlaceholders"
* This would turn %vault_rank% into the name of the Group, that the
* joining player has.
*/
joinText = PlaceholderAPI.setPlaceholders(event.getPlayer(), joinText);
event.setJoinMessage(withPlaceholdersSet);
}
But the placeholders are in there .java
so how would i make it work for the Config
instead
With that example, you could do something like this
String joinText = getConfig().getString("join-text");
/*
* We parse the placeholders using "setPlaceholders"
* This would turn %vault_rank% into the name of the Group, that the
* joining player has.
*/
joinText = PlaceholderAPI.setPlaceholders(event.getPlayer(), joinText);
event.setJoinMessage(withPlaceholdersSet);
Then that would set the join message to what you have set in the config under join-text
Replacing any placeholders you have there
okay
would this worked if my config looked like this
WelcomeMessages:
- "T"
- "E"
- "S"
- "T"
So, with a list?
yes
Yeah, PlaceholderAPI#setPlaceholders(Player, List<String>)
Just that 1 line?
List<String> list = getConfig().getStringList("WelcomeMessages");
list = PlaceholderAPI.setPlaceholders(player, list);
just change "join-text" to mine?
yeah
So that should work
It should, yeah
What doesn't work?
the placeholders
Is there an error, doesn't do anything?
sure
@lyric veldt you can post images here by uploading them on Imgur first
Robin, is leaderheads compatible with 1.16?
Yes Gaby
Hi, is it possible to evaluate a placeholder api variable, then output a string?
@glacial barn what do you mean with 'output' a string? Output it where? Chat?
@vivid sparrow yes
@steep thorn,
Yes Gaby*
I would like to evaluate if a placeholder variable is true or it is a string, then return a string for deluxechat to use.
use javascript placeholders for that
may I know how to pass placeholder variables to the javascript file?
I think if you have a variable like let foo = '%player%' it replaces it automatically
Wow that's amazing! Thank you!
I don't think let works just var. not sure about that
also you could just mae 1 placeholder and use arguments
so you can use it for multiple placeholders
var placeholder = args[0];
function checkPlaceholder(){
if(placeholder == "true"){
return "yes";
}
return "no";
}```
quick example on how to use args
and when you use the js placeholder just use %javascript_PLACEHOLDERNAME_{placeholdertobechecked}%
I see, thanks for the example
@turbid tide does that actually work?
The current wiki is not that good in regards to information about how arguments or variables are replaced when they represent placeholders (https://github.com/PlaceholderAPI/Javascript-Expansion/wiki/Advanced-Scripts)
I think some examples would be nice
I thought you had to declare it as a var and that PlaceholderAPI did some preprocessing before feeding it to Nashorn, but I haven't checked the source tbh
hmm idk where I've seen it when I've learnt about it but no one told me there are some examples somewhere xD
but yeah you can do that
I'll try adding something in there or ask cj to do it since he's better at writing explanations xD
@steep thorn added myself an example. hope it will be enough for most people xD.
Wow I didn't even know that storing data was a thing
oh it is
and its amazing
xD
there is already a placeholder made if you want
on the community javascripts
Maybe something with PlaceholderAPI.static.setPlaceholders or whatever as an example could be cool
I saw it going by here yesterday
oh yeah.
that could be a thing. I just need to think of a way to explain it xD
I'm bad at explaining things. like bellow average :))
ok added @steep thorn hope its good enough. 🙂 Already told the others to make it better if they think its not enough
Looks good
oh
I'm dumb
forgot to add the var keyword
welp fixed. lmk if you think there should be something else that needs added.
Does the website integrate with papi to parse them?
I have a theory on why /papi reload don't like my expansion , might be something to do with setting on my ecloud account
What setting
@limber ice,
I wish barry knew how important this was
I can't update my expansions to update them either, not sure what or where I should be clicking on
so you have a love hate relationship with barry also
How do I put a placeholder in a holographic display?
is there a placeholder for the date
Hello, it is the DeluxeMenus plugin, I put the configuration but the data does not appear or an alliance is made, how can I do it to combine everything, please help me
Thank you! Appreciate it 🙂
Do you know of a leaderboard plugin (shows up on screen) that also does that?
Does that one show a leaderboard on-screen? Or does it just make a leaderboard using heads and signs...?
you can put the placerholders anywhere it accepts placeholders
so in holograms, scoreboards
signs, menus
Hello, it is the DeluxeMenus plugin, I put the configuration but the data does not appear or an alliance is made, how can I do it to combine everything, please help me
@tranquil yoke You can do holograms, signs, armorstands and also show it in your scoreboard (on the side of your screen) if you have a working scoreboard plugin
Oh wonderful
ugh @north oak /papi parse me %strikepractice_global_elo% what does it return?
It doesn't work, I get like this all the time, I would like to find the command or some kind of help: c
ugh do you have the strikepractice plugin installed?
It's not necesary?
?startuplog
Why woud strikepractice not be necessary for showing... strikepractice data?
?startuplog
One moment please, I don't speak English, I'm with the translator, I'll install the plugin
ugh?
I don't understand what you expected it to show if you don't have strikepractice??
you don't have the strikepractice plugin?
If I have the plugin, but the error continues
Like we said, send the logs
Right now i upload it
Do I have to add a placeholder to the config to be able to use it? I just downloaded this plugin and am trying to use vault placeholders. I have papi and have uploaded vault to papi
@tranquil yoke did you buy it?
Buy vault or PAPI
'this plugin'
holographic placeholders?
Oh, sorry. I thought you were talking about the leaderboards
Oh shoot I'm on the wrong discord channel my bad
No it's fine
you and robin both seem to be that way lmao
sounds like you thought you were in a leaderheads channel lol
If only that existed
@winged chasm Does the Vault placeholder itself work? /papi parse me %vault_eco_balance%
?startuplog
?paste
I have better things to do than going through a ton of different log files
Just upload the one that the bot says
You could also have checked the logs yourself:
[14:33:24] [Server thread/ERROR]: Error occurred while enabling StrikePractice v2.5.7 (Is it up to date?)
java.lang.NoClassDefFoundError: me/clip/placeholderapi/external/EZPlaceholderHook
at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_222]
at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[?:1.8.0_222]
Plugin isn't even enabled
And the version you use is heavily outdated
And with 'heavily' I literally mean YEARS
Dec 3, 2018
@near inlet which Papi version?
Looks to be something with DeluxeChat.
I mean build
townychat expansion
is there an expansion inside dchat? O.o
you can hook the 2 but i dont think its related to this
It's more of a listener iirc
i was using the dchat and townychat before i updated papi


