#placeholder-api
1 messages ยท Page 63 of 1
agree
48 ||so it fits my sleep schedule||
Thank you so much @bronze bison ๐
np ๐
๐๐ป
Hey guys! I am trying to create a scoreboard plugin for my server, And i am trying to hook placeholderAPI into my plugin. Anyone able to help on how to do it?
String current = ChatColor.translateAlternateColorCodes('&', scoreboardtext.get(i)); current = PlaceholderAPI.setPlaceholders(p, current);Will this register all the placeholders from PAPI or am i doing it completely wrong
What is the player needed for though? Just wondering
is it for registering it for that player?
It sets the values of the placeholders to the player you specify (usually the one viewing the text)
Ahh yeah of course lmao
So for example, The player the text was created for got his name
Yes
The plugin broke after a server restart, out of nowhere :(
WARN Task #19 for PlaceholderAPI v2.10.2 generated an exception
A startup log would help.
=paste
Please use a paste service to share configs, errors, code and long logs.
โข HelpChat Paste
A member of staff has requested I move your message to a paste,
Most likely beacause it contains a config/error/code snippet.
Since it's quite small, I didn't see a reason why? But I'll make sure next time ๐
.....
Means you're using WorldGuard expansion but it doesn't think you have WorldGuard installed.
ah
you're using the latest worldguard?
@trim mist not the case
sk89 fucked everything up
I think I am, yeah.
Right now the WG expansion is only good for Worldguard 6.2.2 and below
Worldguard 7 changed a LOT of things
So, what should I do?
try 6.2.2 on 1.13?
not sure if it'll work
wait
you're on 1.12
why use the 1.13 version of wg
and how O.o
I'm not? I'm using the following: worldguard-bukkit-6.2.2.jar
i take back everything I said
Glare was correct
what's your papi version
latest
hmmmmmmm
wait
If you visit the WorldGuard page on Bukkit one of their members said: It's their plugin so it's entirely their issue. We don't support other plugins.
i think i got it backwards
cj, it's an issue with the WorldGuardEpxansion.
I did get it backwards
Hm, how does one solve this then? ๐
Sure, take your time ๐
NoClassDefFoundError... they changes some stuff in the api...
1.0.2 is for 6.2.2 and below
No expansion found with the name: worldguard
but i guess it should work for him, since he isnt using new wg
@neon oxide
NoClassDefFoundError
what class
idk let me check
Should I try and upload that and restart my server? @mint fable
Okay, I'll give it a try.
okay aboody
I figured it out
sk89 fuck so many things
he fucked it, then unfucked it
yea lol
so for 7.0.0 beta 1 the class was moved
and he put it back in beta 2
so 1.2.0 is only for 7.0.0 beta 1?

i checked it yesterday cuz i was talking a look at the issues in papi repo
and it didnt work for me, so i left it cuz im not so sure but i guess clip said that he wants to update the expansion
1.0.2 doesn't work?
The file you told me to upload.
can you check the version
What do you mean?
I simply added this expansion: https://api.extendedclip.com/expansions/worldguard/versions/worldguard-102/
Not wrong
also, @bronze bison I can't keep the story straight
sk89 fucked stuff up and idk which version is for which and it's all lies
I THINK 1.0.2 is 7.0.0 beta 1 and below, 1.2.0 is beta 2 and beta 3
so 1.2.0 should work on the latest
I'm so confused lol
you're not alone
๐
but if you delete that other expansion, it should start working
Hm, which one? The other WorldGuard one?
what are the names of the files
They are different.
I deleted the older one and I'll now restart.
It works now ๐๐ป
Thanks for the help @mint fable. Really helpful ๐๐ป
It must be frustrated for you huh?
that's all that matters
I can imagine lol
perfect
ill take a look at it and try it when i got some time to
worldguard placeholders haven't worked for awhile now, since I don;t use I didn't seem to care
its been a while ya
@ionic lodge can you fix the token enchant expansion version
Seems the version in the expansion doesnโt match the version specified on ecloud
Causes users to always receive a message the expansion is out of date
@final shadow Have you actually made changes to the plugin since last update? Thought you said you did.
Ya
Ahh okay.
Kinda important only a 1 check change
Fair enough.
Hater
It's a pretty solid update. Probably need more though.
Good
Been working on dm all day
Going to release 1.13 today?
Nice. And then it'll just be 1.14 from then on?
๐ฃ
Well api version is shit so yeah
Latest here on out
U know the plugin wonโt load pre 1.14
For 1.14 I am adding a nbt option
U can specify the key value of nbt data for an item
Have fun with that
Itโs basically done lol
Awesome.
Go fix the bug in timeismoney
No u
Ez fix
Say I wonโt
Already dealt with that one so itโs as easy as adding if the event is sync or async in the constructor and only calling the event in the thread specified
Clip please stop ignoring me and update the engine of the js expansion, 
super(true)
Bruh na shorn is dead
Iโm really not sure going forward what to do yet
Java eliminated the JavaScript engine

No but could use an update =/
Stay on java 8
Thanks for making it tho โค
Lol
yea its the best expansion
@final shadow will fix it
TYVM here is a git issue related :
https://github.com/PlaceholderAPI/PlaceholderAPI/issues/92#issuecomment-491941591
hey, whats exactly is placeholder for? im confused af
i have it downloaded, since a lot of other plugins require it. but is there anything i need to do with it specifically?
There's not really too much you need to do with the plugin itself at this point in time! It's mainly for plugins to hook in to!
okay awesome ๐
what about vault? can you give me any insight as to what that is?
is it essentially the same thing
Yeah vault is a plugin that lots of economy and permission and chat plugins hook into
but i dont need to do anything with it, either? I am doing a vanilla server so there isnt any economy. just LuckPerms and perhaps ChatControl
Correct, you should be okay.
You're awesome! I couldn't find anything that really spoke too much about either of the two.
Glad I could help man!
@final shadow fixed.
;o
i forgot to add version placeholder in my groovy script.
Ty
np.
Hey @final shadow sorry for ping. But on the Pinger extension, it doesn't seem to support the second line of the MOTD could that be added like
motd_1 motd_2 or if they just do motd it would be the same as now? that would be really helpful in case of rn i could put a hologram with first line being RELEASING and second being the timer.
could you look into it?
!faq - Retired command.
!help - Shows this menu.
!info - Get info about stuff
!papi - Papi command
!ping - Is gary online?
Please tell me what I am doing wrong... http://prntscr.com/no64hx
I got Factions and PAPI installed.
Don't think you can parse those because it requires two factions
use the parserel command and for colors add some text after the placeholder to be able to see the color
Latest PlaceholderAPI build from the CI is compiled under 1.14.1 if anyone wants to try it out.
is there release for 1.14.1 yet?
Of PlaceholderAPI?
no, I forgot I was attempting to compiling 1.14.1, and forgot to check if it did it
the papi I have loaded just fine
You're missing the player and vault expansions of PlaceholderAPI
/papi ecloud download Player
/papi ecloud download vault
/papi reload
hm?
I want to show in the chat the prefix and suprefix of each group that I put in the permissions plugin
#luckperms
What?
@noble brook dont send useless messages.
@frozen scaffold You can use these placeholders aswell https://helpch.at/placeholders#luckperms
Just need to download them with /papi ecloud download LuckPerms
Just ask, someone will help if not me
how do I set the name of the clan to appear
Which clan plugin is it?
Faction mcore
Here.
Most if not all the placeholders you can use you can find here: https://helpch.at/placeholders
what I want to know where% factions faction% goes in the configuration folder
@frozen scaffold %factions faction% goes where you want it to appear in the cat format
papi 2.10.2 has this on bootup for 1.14 and 1.14.1
https://paste.helpch.at/susamuvuto.css
Thatโs fine
If we specify an api version it will only work on the specific version we set after that api version was introduced
Ex: if we specify 1.14 then the plugin does not load on 1.13
Since we donโt do anything regarding the breaking changes that require api version itโs not necessary
Can we set it to an invalid one lol
api-version: daddy
^^ ;p
stop lol
I set my plugins to 1.13 and they work on 1.13 and 1.14
not all plugins do
I know if they are coded to work on older version then 1.13 they don't like to work if you do that
is there any way to edit the format of a placeholder?
for example the %towny_town% placeholder, I would like to format it like this [TownName], but if you do [%towny_town%] and have no town, it ends up looking like [] in chat.
is there a way to edit it so the placeholder parses with the brackets like [TownName]?
@hollow heart can you add the brackets on the town names in towny
i'll try that and see if it changes
You could edit the expansion if that doesn't work
if that don't work then make a js expansion, but thats how I do it for LP prefixes
when you say add the brackets to the town names, where in towny's config is that?
I add color and what ever bracket I want to use in prefix
I don't use towny, my guess is how you create the town names. if done by players then you will have to use a js placeholder to do it
alright i'll have to do that then
@hollow heart I have not tested it but this should work
https://paste.helpch.at/erahemojaj.js
how would I implement that as an expansion?
did you download the JavaScript expansion?
then you add a couple of lines to javascript_placeholders.yml to create the file to place that code it
perfect! got it working, thanks for your help and for basically doing it for me
next one you should have a better understanding how to do on your own
Hey, is it "normal" if when I want to use the placeholder
%worldguard_region_name%
I see a lot of error ?
Spigot 1.13.2 latest build
Papi 2.10.2
Worldguard 7.0.0-beta-03;e51a220
Yup, we're aware of it. It's an issue we have to wait on till a stable release of Worldguard is out.
Ok so I can prepare my commands on it ^^ Thanks
By the way, Worldguard is still alive ? ๐ค
Yup
@limber ice I tried to put it everywhere and could not give me an example?
@frozen scaffold I don't recall what your issue was?
Hi I can not make the clan appear in the chat
clan? and are talking about Dchat?
what is the format in Dchat look like?
now i show you
=paste
Please use a paste service to share configs, errors, code and long logs.
โข HelpChat Paste
it says you image was deleted
worked for me
Ehat
but not ss xD
What
both attempts to open it says deleted
this is what I use ofr a prefix
prefix: '%deluxetags_tag%&7<%rel_factions_relation%%factions_role% %rel_factions_relation_color%%javascript_faction%'
the channel should be left alone at default settings
now I try it and I say
Okey
so that the symbols left him in this?
encode in UTF-8
not too sure whats saying OKay
well if you don't have deluxetags you should remove this placeholder, %deluxetags_tag%, and this placeholder is a JavaScript placeholder if you didn't set it up then it will not work, %javascript_faction%
do you have placeholderAPI
/papi ecloud download factions
/papi reload
the two commands at bottom have to be run to get the list of placeholders to work
I already did that
also in dchat you need to enable relationship placeholders
relation_placeholders_enabled: true
is already activated
the truth that there is no way I think I'm going to have to change plugin
what version of MC?
1.8
I assume your running an older version of faction
Yes
just went to my faction server and the chat is broken
One more thing, how do I put symbols?
I have never done it, others who help say you change config format to UTF-8
open file in notepad++ and you can change encoding there
yes i did it and it stays the same
Is there a way to sync placeholder api data across servers with mysql?
Well considering PAPI actually doesn't store any data itself other than the config, no.
Well, those specifically are from playerdata in the world folder.
Si.
damn plugin is broken in 1.14.1
honestly no other stats plugin besides the one made by the spartan guy but it only has a gui
no placeholders
I think i can use mvdw's mysql placeholders but that will be a pain in the ass
They still pull from player data
i can make it store a placeholder in the mysql database and add tables but it is mostly manual
and not really advised
and i think i can pull data from the database
Placeholders also update very often based on what it is
yeah that wont be good lol
I would try to compile it for you under 1.14, but it's dependencies don't event download.
@hollow ridge those are normal errors on first boot when installing statz
but statz is till broken in 1.14
dang
I have a working version if you don't need travel stats
I'm making sure I have the right file been working on getting the travel to work, this one has many working for travel but not all
It's open source (https://gitlab.com/lolmewn/stats-plugin/) You might be able to hire someone to fix it.
hey
is there any way to create placeholders with something like javascript
without having to put {javascript_<name>}
@novel sorrel lolmewn is updating his plugin, I reported an issue I found while testing it and he responded in a few hours
@minor wolf no, has to have that so PlaceholderAPI knows where to get the info
Yeah
Yes, you can use mvdw placeholderd on papi
@carmine veldt is the footer icon broken for you too?
That's not what I meant.
i cant find a mvdw support server :/
I dont know if mvdw support custom placeholder
yeah i understand what you mean
But if it would, you will have to code them too I assume.
i know the individual plugins do
Do you know js?
yeah it is broken gaby, it must of broke when I updated his icon. Iโll update the code soon
what plugin do you want placeholder for?
You can make custom placeholders using the js expansion
they are in js
Oke piggy
yeah i know js basically
yeah i know, and its worked, but i dont like haveing to type up javascript_ infront of my placeholders
Description: A resource that allows information from your favorite plugins be shown practically anywhere!
โข Spigot
โข Wiki
โข Placeholder-List
โข GitHub
โข eCloud
You cant have everything with no work.
yeah true :/
Use js
Learn java
Or dont use custom placeholders
just seems a little gimmicky imo
๐คท
well atleast the option is there
also sorry my wifi is making my discord messages send 10-20 seconds later
Dw :')
I mean why do you really care about a damn javascript_ prefix
cough wrong channel ๐
Can anyone help me with papi chatinjector
putting ezrankspro prefixes in chat
but player needs op for it to work
?
chatinjector.parseโ
yea
but that means they can type any placeholder
and it works
like they can type {ezrankspro_rank} in chat and it returns their rank
it doesnt work without this permission?
no
ok then u need the permission
yea lol
o lol
i suggest u use a chat plugin that supports papi by itself..
like DeluxeChat (Premium)
or VentureChat (Free)
:/
@trail cape do u want to add [ ] for the placeholder too?
yes if its possible
var guild = "%guild placeholder%";
function getGuild() {
if (guild !== "" || guild !== " ") {
return "[" + guild + "] ";
}
return "";
}
getGuild();
``` ok use js expansion and use thic
just change the guild placeholder to the guild placeholder (obviously ;p)
check js wiki if u dont know hot to setup a js placeholder https://github.com/PlaceholderAPI/Javascript-Expansion/wiki
What are the bungeecord placeholders/variables?
And is there an placholder such as: %whitelist: server%
It would say something such as: "Whitelist: No" When you response please mention me.
@upper panther
@upper panther where do you want to use that placeholder
In the hub and the server-selector (compass)
In the hub I mean above the npc it says: whitelist: off/on
oh you want to check if it's on or off, not if a player is whitelisted
that sounds like it could be useful, ye
Yes but for the servers connected to the bungee
Does the plugin have placeholders?
there is a addon that hooks into papi
np
js placeholders isnt working ._.
https://pastebin.com/SWzRpYgU
can't guarantee this'll work, but try updating to the latest papi?
honestly probably shouldn't make a difference, but you never know
um /papisp command does this
anyways
var town = "%towny_town%"
function getTown() {
if (town !== "" | town !== " ") {
return "&8[&c" + town + "&8]&r ";
}
return "";
}
getTown();
is this correct?
I get script error
=paste
Please use a paste service to share configs, errors, code and long logs.
โข HelpChat Paste
|| not |
gaby nice try ๐
??
That too
Yw
Can i use placeholders in open command?
Sadly no
fuck
open commands?
like stats %player_name% i think
Read it lul
with s, will run the command when u open the menu
Without s, is the command to open the menu
AND that should be in #clips-plugins smh
add ; after the var and one more |
as in js?
javascript expansion
ah kk
function getTown() {
if (town !== "" || town !== " ") {
return "&8[&c" + town + "&8]&r ";
}
return "";
}
getTown();```
so that :?
Yeah.
:P
https://hastebin.com/anezafovap.apache would updating papi fix it?
That cmd is broken afaik
@trail cape did it fix your issue?
o
oh is that what pixel was using earlier too?
it's a weird error tho... because the method does exist
Oh wait I don't think it does
It's because it's String... instead of String maybe? I've never seen ... in java
and okay, that makes sense
And updating papi didnt solves the /papijsp error. Just tried
nah it wouldn't
I didn't know your error was a /papijsp one
since you cut that bit off
/papi reload then try it, it doesn't always work properly
/papijsp is a command, what does it do?
gives u papi js expansion commands
/papijsp list/reload
and theres another one iirc
looks broken to me
https://paste.helpch.at/emuhokegaz.sql
what is it used for anyway
I never used it, guess if your too lazy to look in folder of JS
@vivid sparrow Unknown expansion.
is it an expansion listed in the placeholder list?
it doesnt have an expansion.
its built-into the plugin
and the placeholders are in the plugin page
https://www.spigotmc.org/resources/2-0-kitpvp-1-8-1-13-custom-kits-scoreboard-gui-levels-kill-streaks-abilities-more.27107/reviews?page=8 Here is saying this plugin have placeholders (gives examples) but i can't find the expansion pack.
oh,ok,it's possible to make an expansion pack for this plugin?
I want to create one.
not all plugins should have expansion to support papi
%kitpvp_stats_deaths% - The deaths of a player
%kitpvp_stats_kdr% - The kill : death ratio of a player
%kitpvp_stats_level% - The level of a player
%kitpvp_stats_experience% - The experience of a player
%kitpvp_player_killstreak% - The player's current kill streak
%kitpvp_player_kit% - The player's current kit```
it can be built-into the plugin ....
Read the plugin page, not the reviews.
so u dont have to download anything, just the plugin
and the placeholders should work
i want to use the placeholders in other plugin
as i said the placeholders are in the plugin page, and gaby just sent them
ok?
use them wherever u want
just make sure that the plugin ure using them in supports papi
I don't must download an expansion pack for using in other plugins?
no
ok,wait,i test it
Daca nu gasesti o expansiune in ecloud atunci pluginul fie nu are placeholdere ori sunt adaugate direct in plugin. Ez pz @steep portal
o
xD
Contacteaza developerul. Nu putem face mai mult.
Ok,multumesc.
;)
=]
Papi have changed the method used to register placeholder and maybe they havent updated yet.
ok.
contact the plugin's dev if they havent updated yet
ok
Not sure if this is know or not but every time I use /papi reload, all the placeholders unload in a bunch of other plugins and don't re-enable after. Is there a fix for this? Am currently 1 version behind of placeholderapi due to having plugins still on the old system.
reload these plugins
havent happened to me, does reloading the other plugins fixes that?
already tried, did nothing.
does the placeholder(s) work in the parse command?
yes but not in the plugins
well then i dont think its a papi issue
since the placeholder(s) work fine using the parse command
i dont think so, Clip? ^^
@near nimbus happens to me
its plugin side issue
since it only happens to certain plugins
what plugins does it happen with you?
like deluxe plugins doesnt cause an issue only things like factionsuuid
ahh. for me, noticeably it happens with savagefactions (fuuid fork) and TAB.
wth then http://prntscr.com/np4ayo
hey i need help
with?
im trying to do this
=imgur
Please use imgur to share screenshots and other images.
โข Imgur
is that Holographic Displays?
yeah
do u have holographic extension?
what do you mean
Holographic displays doesnt support papi, u have to get this plugin to make papi placeholders work in hd
ohhh okay
and make sure u have the expansion
i mean the player expansion
/papi ecloud download player
/papi reload
and do the same for other placeholders
so to make player placeholders work, u have to download player expansion
and so for other placeholders
this have all papi placeholders with their download commands
ok then u dont have to download anything then
if it doesnt have a download command then its probably built-into the plugin, so u dont have to download anything
ok they should work now
yeah it still shows %bw1058_player_level%
on the hologram ?
yup
did u download ProtocolLib too?
wait is the player placeholder working ?
ok try try restart ur server
okay restarting
is there a way to get like top player placeholder so it dont show the name is yours but someones as live update
YES
it worked!!
like top players
top on what
1, 2, 3 etc
i mean top balance, level? what
level
check if theres a placeholder for that?
if there isnt, suggest that to the plugin dev
The plugin That provides the placeholders that broke and worked after restarting your server must be adding them from that plugin
yea its a built-in expansion
The dev of that plugin needs to add the persist method to the expansion
Hellow
hey
Theres not time to wait! Ask your question @silver radish!
If you do /papi reload that expansion will be lost until you restart the server again
yea thats for built-in expansions
I'm not a programmer, I just want to know if it's possible with a plugin or variable
Tell the author to read the wiki and update
if theres a variable/placeholder to show top players, then yes u can
and i dont think there is
Thanks for the help
np, glad to help ๐
okay
now that is what it looks like
now i just need to figure out how to get top players
instead of my name
if theres a placeholder for top like %blabla_level_top_1% %blabla_level_top_2%
u can, but if theres not, u cant
leaderheads has that, only one I know of
oof
maybe u can suggest that to the plugin dev to add that?
okay im using it for bedwars1058
oh yea forgot about that
umm
leaderheads has bedwards stats i believe
it is a premium plugin tho
and idk if it has top
nvm
never used it but afaik u can with any placeholder ?
just checked leaderheads it didnt haveit
rip
i cant paste other links cuz but it is related to leaderheads lol
well i guess u can just ask the plugin's dev to add that
yeah i just asked dev to add top stats for placeholder
now it is just waiting game
@bronze bison so thanks for helping out much as you could
๐
yeah me too
does anyone know a race plugin that uses papi i want the race to be in the name tag
Hope we get accepted ๐
What do we get
I'll dm you
Fame
Hellouda
[PlaceholderAPI] MyCommand is currently using a deprecated method to hook into PlaceholderAPI. Placeholders for that plugin no longer work. Please consult [emmerrei a.k.a Ivanpro] and urge them to update it ASAP.
ERROR
CONSOLE
Try to contact the author and ask him to update
Ok!
Spigot?
@final shadow
DeluxeMenus
update_interval: 1
update: true
PlaceholderAPI not working
@silver radish
On DeluxeMenu can I set on open_requirement a placeholder? like I did with the kits..
data: 5
amount: 1
slot: 19
priority: 2
update: true
view_requirement:
requirements:
Daily_available:
type: string equals ignorecase
output: 'yes'```
So players can't open the GUI if the kit is on cooldown and when they can they will be able to open the GUI
Should ask that in #clips-plugins @oak sorrel (and yes you can, check the Wiki)
Online Maker - https://placeholderapi.github.io/DeluxeMenuMaker/ - help-chat/DeluxeMenus
ty
+Pixel, not too sure
Suggest #development for dev help, even if its regarding papi
ok
Yay, Worldguard start to behing stable ^^
WG has been stable on 1.14 for about a month
I'm having issues with it on 1.13,so idk what your on.about
I need help, for some reason I can't use %worldguard_region_name% without a thousand errors, I have the expansion for world guard, and worldguard fully up to date, and no matter what i try to use the placeholder in, it throws errors in my console. im running 1.13.2
1.2.0
ok then, due the changes of WG API, the expansion isnt working. and waiting for a stable version of wg to update the expansion.
so i guess u should wait until that happens
That honestly could be a very long time since it seems this has been an issue since 2018.
v1.2.0 is meant to add support for 1.13, then WG dev mess with the API again, so thats why clip/glare are waiting for a stable version of WG
afaik ^
Alrighty, thank you.
np ๐
you could always try 1.0.2 and see what happens
What beta are you on @abstract loom ? Beta 1, 2, or 3?
(Of worldguard 7.0.0)
i believe 3
okay, I'd say give 1.0.2 a try
if it works, cool, if not, then we're back to what boo said
ill give it a try and let you guys know later if it worked or not
๐
When I put %player_displayname% on my scoreboard it dont show my name just %player_displayname%
How di I fix
np
whats the % .......% for player rank
%vault_rank% if that's what you (will display just the name of the rank)
no problem
or with lp
%luckperms_highest_group_by_weight%
or
%luckperms_prefix%
%luckperms_suffix%
Is there a way to download all the placeholders with 1 command
No, you have to download the expansions as needed
Should /tellraw SenseiTechUS {"text":"%player_name%"} work?
I've been using it to test placeholders
||sorry for double posting, wanted to put it in the right channel||
๐ฌ Thanks
@austere hawk /papi reload
๐
what is this
16.05 21:08:04 [Server] ERROR [PlaceholderAPI] SuperCredits is currently using a deprecated method to hook into PlaceholderAPI. Placeholders for that plugin no longer work. Please consult [PedroJM96] and urge them to update it ASAP.
It says what it means - those plugins are using old methods that are no longer supported to hook into placheolderapi
report the errors to the plugin authors so they can update the methods used
report to supercredit right?
supercredits yes
ok
@mint fable No luck on beta2
@abstract loom
Please be patient and don't ping helpful or staff members!
Rc1, Beta3, and beta2 both dont work for %worldguard_region_name%
Beta 1 doesnโt work?
beta 1 is 1.13.1 exclusive
Also I was recommending you switch the expansion version
Not the beta version
So try that if you wanna use beta 2 or 3
I know
apparently that's been broken for a while clip
whenever /papijsp is run I guess
Could someone help me on that javascript placeholder issue? Will appreciate it, thanks! https://www.spigotmc.org/threads/indexoutofbounds-javascript-placeholderapi.373250/
You need to check the size of the lore before getting a line
If lore.length < index
@deep hollow
Thanks for you reply @final shadow , I added it and I'm having this error: https://pastebin.com/UGewY4qG
appreciate your help ๐
Whatโs the error
forgot a } at line 31
no
` if ( material === 'AIR' ) {
// return 'AIR' when you aren't holding an item (You can change it to whatever you want)
return 'AIR';
} else if ( has && line === ' ' ) {
return lore.replace(/^[/, "").replace(/.$/,"").replace(/, /g, '\n');
} else if ( has && line !== ' ' ) {
line = parseInt(line) - 1;
if (line < lineLore.length) {
return lineLore[line];
} else {
return "Out of bounds";
}
}
itemlore();`
if (line < lineLore.length) {
return lineLore[line];
}```
Like that is giving error too
` if ( material === 'AIR' ) {
// return 'AIR' when you aren't holding an item (You can change it to whatever you want)
return 'AIR';
} else if ( has && line === ' ' ) {
return lore.replace(/^[/, "").replace(/.$/,"").replace(/, /g, '\n');
} else if ( has && line !== ' ' ) {
line = parseInt(line) - 1;
if (line < lineLore.length) {
return lineLore[line];
}
} else {
return "Out of bounds";
}
}
itemlore();`
Caused by: <eval>:1 ReferenceError: "lineLore" is not defined
So I just have to create a new variable "var lineLore = ' '; ?
sorry for bother you, don't know javascript :S
Thanks boody for you reply
but its giving me this error: if (linelore.length โฅ= line) {
I guess that doesn't support this symbol
oh sorry thats from my phone lol
looks like you just want to show a certain line of lore
but why are you converting the lore to a string
sup with all of the replacements
and i have to update it ik
The objective is to show the lores of the hold pickaxe on deluxmenus, but I have tokenenchant, so some players may have 80 lores
and other players have 1 lore..
I don't know how to show the exact lores
%javascript_lore% will return all the lores in its own line
%javascript_lore_#% will return that line of lore #
Clip ^
Can u change that โฅ to normal >
Typed that from my phone and i have no idea why it typed that
Sure ๐
It's working well when I parse it
but when I add the javascript into a deluxemenu menu it's throwing
great ๐
How many did u added? ๐
try this
oof
Btw durability should be upper case
bte clip if he puts 5 and the item had 4 lines only will throw an error
Out of bounds error
actually hold up
Deluxemenus fixed, it was the enchantment "needed to be upper case" thanks aboody ๐
now I'll test clip's script
oh great ๐
oh wait, clip its ain't java
Ull have to define what is number
and isnt that should ve NumberUtils?
Yeah Caused by: <eval>:1 TypeError: Number.isInteger is not a function
There isn't an easier way to get lore of hold item and paste to deluxemenus item?
because some players will have like 6 enchants on lore, others 10.. etc
nope, ive been struggling with this the past 3-4 days ๐
Oh :S
isNaN
just make the second n upper cae
clip it will be easier to make like an option for deluxemenus
to show the lore of hold item
clone item in hand ๐
i really should update my shitty code in js wiki ||been saying this for moths sorry ;p||
>= perhaps
no
length will return the size
so if there are 4 items in the array
it will return 4
when we get an element we start at 0
oke ๐
thee end user inputs 1-4
Working now, but clip there's a way of cloning the item in hand to deluxemenus item?
Oh, will appreciate if you could add that option ๐
remove the # from the placeholder
dm doesn't support it?
It just create blank spaces
rip
wow that would be great
Yeah ๐
rip my ~5k line for doing that ๐
๐
Hello! I am kind of new to using APIs, I've never really done anything with it. I am creating a scoreboard, with PAPI integration. However when the placeholder updates, The scoreboard does not. Is there an event like PlaceholderUpdateEvent?
So i can set the scoreboard every Placeholder update?
No you need to handle updating the scoreboard on your own. We donโt track when a placeholder updates for the simple fact that event could fire as often as the PlayerMoveEvent
which would be ridiciolous ^^
Or more when you are using hundreds of placeholders in different places
Hmm that's true. I'll try to find some way of updating it
every 20 ticks? or would that be too insane
Well maxim uses packets and featherboard has the ability to update every tick async
Itโs up to you
Thatโs how his animation stuff works
Like scroller or rainbow colors etc
Itโs all about how u want to design it
No way would I track used placeholders and call an event if the value changes though
That would be insane for a big server
Hey
Yes?
something is null :p
You'll have to contact the author of bedwars
oof okay i will cuz bedwars1058 suck at responding the bug comments on discord lol
Rip
yup yup
Whelp if they keep ignoring you, leave a bad review on the plugin saying that after countless times of reaching out for help, you got no response.
It seems as someone decided to edit the old Spigot page of PlaceholderAPI placeholders. I reverted it back, but I just wanted to let someone know as I don't know if anything is done afterwards. I'm also not sure if this is the right channel, sorry if it's not.
wiki transferred to https://helpch.at/placeholders
I know, but to what it was edited to, and that it still shows to go to the new one. I just thought it would be right to revert it from what it was edited to
Ah ok, thank you for reverting it

