#placeholder-api

150650 messages · Page 7 of 151

turbid tide
#

have you tried using the dev build of PAPI for 1.16?

dusty junco
#

Its really bugging me

#

Yes about an hour ago but still nothing

turbid tide
#

and are you on latest LP version and also latest LP expansion?

dusty junco
#

I'm on the latest Lp version. What expansion are you talking about

turbid tide
#
/papi reload```
dusty junco
#

oh yes, i have done that several times

turbid tide
#

and other luckperms placeholders work?

dusty junco
#

These are the only ones i have

turbid tide
#

as in /papi parse me %luckperms_prefix% works?

dusty junco
#

I get nothing back from that

turbid tide
#

this is very weird because for me it works

#

and am on almost latest build of 1.16

#

and not even using the dev build of PAPI

dusty junco
#

hmm interesting

obsidian niche
#

Blitzz pls helpme me

#

@turbid tide

turbid tide
#

well I would if you ask your question

obsidian niche
#

Papi mysql problem

#

{Player} variables not working

#

Query

turbid tide
#

papi mysql?

obsidian niche
#

Placeholder mysql

#

Placeholderapi mysql

turbid tide
#

oh I see

#

I have no idea. Not good with mysql and never used that expansion

obsidian niche
#

Who help me

#

Select coins from coins_table where username = 'EmralRG'

#

Manuelly working

#

But

#

Select coins from coins_table where username = '{player}'

#

Not working

junior musk
#

try with {player_name}

obsidian niche
#

Not working

junior musk
#

then it isn't supported

obsidian niche
#

Plugin placeholderapi

#

This expantion

karmic marsh
#

Hey, so I'm trying to do a Math expression with a placeholder that uses {} to surround UUID and it is conflicting with the {} which is required as a replacement to %%. How can I get around this? and also this is getting used in DM.

turbid tide
#

javascript is your only option

karmic marsh
#

Could I get an example, I know nothing of Javascript.

#

I'm trying to use it on and item in DeluxeMenus with the Math expansion.

turbid tide
#

give me the math placeholder you want to use

karmic marsh
#

%math_{skript_Coal::{uuid}} * 1.5%

turbid tide
#

and what is the amount you want?

karmic marsh
#

I'm calculating the worth of each resource in a backpack by multiplying how much they have by how much it sells for.

#

%skript_Coal::{uuid}% returns how much they have.

turbid tide
#
  requirements:
    coal:
      type: javascript
      expression '"%skript_Coal::{uuid}%"*1.5 > 100'
karmic marsh
#

I'm trying to use it in a lore, not a requirement.

jagged spear
#

Greetings, I would like to use placeholder api world guard. Is it possible to replace an empty message with some text if there is no presence in the region?

turbid tide
#

oh I see

jagged spear
#

Here is this placeholder: %worldguard_region_name%

turbid tide
#

both of you need to use javascript then

#

javascript placeholders

jagged spear
#

Sadly, I do not know how to do this ...

turbid tide
#

1 sec I'll give you both a link

jagged spear
#

That would be great

turbid tide
jagged spear
#

I knew about this, but I don’t know how to write scripts ... But anyway, thank you so much!!

turbid tide
#

oh

#

I mean its not that hard

#
function changeReturn(){
  if ("%worldguard_region_name%" != "")
    return "%worldguard_region_name%";
  return "Your Message Here";
}
changeReturn();``` @jagged spear
karmic marsh
#

K this is where my issue with Javascript rises, idk if .js will work but if .json is essentially the same thing and I can change the extension, then I can use Java Scripts.

#

Can't post screenshots

tender vaporBOT
#

@karmic marsh,

karmic marsh
turbid tide
#

its not the same but why wouldn't you be allowed to use other file extensions?

karmic marsh
#

Minehut 🤮

#

I've been waiting a while now and the expansion still hasn't downloaded. It might even be blocked.

jagged spear
#
function changeReturn(){
  if ("%worldguard_region_name%" != "")
    return "%worldguard_region_name%";
  return "Your Message Here";
}
changeReturn();``` @jagged spear

@turbid tide thanks, will this work?)

turbid tide
#

I've been waiting a while now and the expansion still hasn't downloaded. It might even be blocked.
I'm sorry for you

#

wdym Dada?

#

will what work?

narrow oyster
#

Is there a placeholder for EXP in papi for essentials?

turbid tide
#

there is one for exp but its not in essentials

narrow oyster
#

Ah.

turbid tide
#

its in the player expansion

#

%player_exp%

narrow oyster
#

Thanks a bunch!

#

I can't find the expansion.

#

welp

#

Nvm, I did.

turbid tide
#

oh

#

welp xD

fickle eagle
#

I need help

tender vaporBOT
#

There is no time to wait! Ask your question @fickle eagle!

fickle eagle
#

Hi when i try to parse a javascript placeholder i get just the plain text i have already install the javascript extension but still don't get it to work

turbid tide
#

can you do /papi parse me %placeholder% send a screenshot with the command you used and what it returned and then paste the javascript file?

#

?paste

tender vaporBOT
turbid tide
#

?imgur

tender vaporBOT
fickle eagle
#

placeholder

#

Just says that

#

%placeholder%

#

In white text

#

seems like i cant paste the js file @turbid tide

junior musk
#

=paste

tender vaporBOT
junior musk
#

@fickle eagle paste the content of your file on that site, save and send the url

fickle eagle
#

@junior musk

#

I have mutiple javescript files

#

not just 1

junior musk
#

just send one of them

fickle eagle
#

ok

#

Thats one

junior musk
#

do /papi list

#

does Javascript shows in it?

fickle eagle
#

yes

junior musk
#

what's your PlaceholderAPI version?

fickle eagle
#

2.10.6

junior musk
#

server version?

fickle eagle
#

1.15.2

junior musk
#

when you do /papi reload

#

do you get anything in the console about javascript placeholders?

fickle eagle
#

12.07 22:43:41 [Server] INFO PlaceholderAPI configuration reloaded!
12.07 22:43:41 [Server] INFO Successfully registered expansion: player
12.07 22:43:41 [Server] INFO Successfully registered expansion: statistic
12.07 22:43:41 [Server] WARN Failed to set ScriptEngine for javascript placeholder: dameCristal
12.07 22:43:41 [Server] WARN Failed to set ScriptEngine for javascript placeholder: dameStatus
12.07 22:43:41 [Server] WARN Failed to set ScriptEngine for javascript placeholder: dameTitulo
12.07 22:43:41 [Server] WARN Failed to set ScriptEngine for javascript placeholder: asd
12.07 22:43:41 [Server] INFO Successfully registered expansion: javascript
12.07 22:43:41 [Server] INFO Successfully registered expansion: server
12.07 22:43:41 [Server] INFO 16 placeholder hooks successfully registered!

#

failed to set scriptengine

#

for all my files

junior musk
#

send your javascript_placeholders.yml file

#

in your PlaceholderAPI folder

fickle eagle
#

ok

junior musk
#

(paste it on the site)

fickle eagle
junior musk
#

wtf

#

can you do /ver
in console and copy paste the output here?

fickle eagle
#

12.07 22:47:40 [Server] INFO This server is running Paper version git-Paper-143 (MC: 1.15.2) (Implementing API version 1.15.2-R0.1-SNAPSHOT)
12.07 22:47:40 [Server] INFO You are 235 version(s) behind

trim mist
#

o.o

#

You should really update your Paper.

fickle eagle
#

that far back lol

#

1 sec

#

ill try

trim mist
#

Updating will be a night and day change oml.

fickle eagle
#

ok lol

#

think my hosting service was behind

#

lol

#

on those updates

#

now im updating to 371

#

okay

#

im on 371

junior musk
#

does it work now?

fickle eagle
#

no

#

for waht im doing

#

Nope

junior musk
#

what if you redownload the Javascript expansion?

fickle eagle
#

12.07 22:53:44 [Server] INFO Psychological issued server command: /papi reload
12.07 22:53:44 [Server] INFO Successfully registered expansion: player
12.07 22:53:44 [Server] INFO Successfully registered expansion: statistic
12.07 22:53:44 [Server] WARN Failed to set ScriptEngine for javascript placeholder: dameCristal
12.07 22:53:44 [Server] WARN Failed to set ScriptEngine for javascript placeholder: dameStatus
12.07 22:53:44 [Server] WARN Failed to set ScriptEngine for javascript placeholder: dameTitulo
12.07 22:53:44 [Server] WARN Failed to set ScriptEngine for javascript placeholder: asd
12.07 22:53:44 [Server] INFO Successfully registered expansion: javascript
12.07 22:53:44 [Server] INFO Successfully registered expansion: server

junior musk
#

/papi ecloud download Javascript
/papi reload

fickle eagle
#

nopenope

junior musk
#

=/

fickle eagle
#

is it the engine

#

Nashhorn

junior musk
#

nashorn yes

fickle eagle
#

think it could be that

#

cause

#

ik its a jsavascript engine

#

but idk if its working with placeholder

#

yeah

#

idk what to do lol

junior musk
#

neither do I =/

#

sorry

fickle eagle
#

all good

#

could you try to ask someone to help

junior musk
#

generally, others just come here and hemp people if they know why it doesn't work

#

so either some are just lazy like me sometimes x), either they aren't available, or else they just don't know

fickle eagle
#

rip

#

keep in mind

#

thisplugin did work before

#

i mean config

#

just stopped

junior musk
#

👀

fickle eagle
#

ikr

#

lol

junior musk
#

what if

#

what if you try to setup a smalk test server with only PlaceholderAPI and the Javascript expansion

#

and try to make one script load

fickle eagle
#

i could try

#

but i dont see how this will effect placeholder api

#

if i just copy a scripy

#

wont i do the same

#

?

junior musk
#

I have no idea x)

fickle eagle
#

okay 1 sec

#

nope

#

didnt wokr

#

work

junior musk
#

=/

undone storm
#

placeholder api placeholders arent working in skript for me

#

both skript and papi are up to date

#

set slot 13 of player's current inventory to slime ball named "&6Server: &c%server unique joins%"

#

how do i put placeholder api placeholders into a skript for it to work because its not working no matter what way i try it

junior musk
#

ask Skript if it even supports PAPI

#

I think it needs an addon

undone storm
#

ok

#

also does my server need to be spigot

#

mine is paper and that might be the issue

junior musk
#

I don't think so

undone storm
#

ok

junior musk
#

I don't see why it would affect

polar umbra
#

Is there a placeholder that can put the item in hand into a GUI slot?

median copper
#

what's the best way to create a placeholder that displays different text depending on which permission group the player is in? Was thinking a javascript placeholder but I'm not sure if it's possible to grab the vault group.

storm cedar
#

where can i find the most recent dev build of the plugin?

turbid tide
#

in the pinned messages here

storm cedar
#

ty

turbid tide
#

no problem

austere hawk
#

Is anyone else having a problem connecting to the PAPI ecloud? For some reason atleast my server isn't and its preventing me from downloading the deluxe chat apis

#

13.07 05:05:59 [Server] Server thread/INFO [PlaceholderAPI] Successfully registered expansion: player

13.07 05:05:59 [Server] Server thread/WARN [PlaceholderAPI] Loaded class me.clip.deluxechat.DeluxeChat from DeluxeChat v1.16.0 which is not a depend, softdepend or loadbefore of this plugin.

13.07 05:05:59 [Server] Server thread/INFO [PlaceholderAPI] Successfully registered expansion: deluxechat

13.07 05:05:59 [Server] Startup Done (5.815s)! For help, type "help"

13.07 05:05:59 [Server] Craft Scheduler Thread - 0/INFO [UltraPermissions] Loading Translations from the Web...

13.07 05:05:59 [Server] Craft Scheduler Thread - 3/WARN [PlaceholderAPI] Unable to fetch expansions!

13.07 05:05:59 [Server] INFO There was an error with the server host connecting to the PlaceholderAPI eCloud (https://api.extendedclip.com/v2/)

13.07 05:05:59 [Server] Craft Scheduler Thread - 3/INFO [PlaceholderAPI] 0 placeholder expansions are available on the cloud.

jolly crystal
#

Github is apparently down. that might be the issue.

austere hawk
#

copy. ill keep trying occasionally. i wonder if anyone else is having the issue though. trying to isolate if it is just me having the issue

trim mist
#

It's random

warm topaz
#

u can download the expansions manually with the link in the error

pale berry
#

Hello everyone, please help me, why am i being gived out "[object Array]" ?


function check() {
 
   if (faction === "0") {
       return "&7No keys :(";
   }
 
   if (faction === "1") {
       return "&uYou have 1 key!";
   }
   
   else {
       return faction;
   }
}
check();```
balmy marten
#

As you're declaring faction as an array

#

so it will be returned as an array

#

Just remove the square brackets and you should be fine

pale berry
#

Thank you very much @balmy marten ! And is it possible to do that me wrote in response 1 + 1 = 2, not 1 + 1 = 11. I'm just newbie to this and I don't know how to do it

junior musk
#

try to remove the " " around the placeholders

turbid tide
#

nah that will break it

#

he needs to parse as Integers

grave sonnet
#

how do I use luckperms with deluxe chats?

warm topaz
#

#spigot-linking

grave sonnet
#

how do i do that?

warm topaz
#

follow the instructions on the channel

turbid tide
fluid chasm
#

i get this error with the statistics expansion
12.07 17:04:46 [Server] ERROR [PlaceholderAPI] Failed to init placeholder expansion from class: com.extendedclip.papi.expansion.mcstatistics.StatisticsExpansion
12.07 17:04:46 [Server] ERROR [PlaceholderAPI] org.bukkit.Material.isItem()Z

brisk coral
#

Use the pinned version of the statistics expansion

fluid chasm
#

thanks

quiet dune
#

Hi, I'm getting warn in the console [PlaceholderAPI] Failed to set ScriptEngine for javascript placeholder: wg_isowner. What does it mean?

#

javascript_placeholders:

wg_isowner:
  file: example.js
  engine: nashorn

example.js:

function dt_owner() {
    return "%worldguard_region_owner%".contains("%player_name%");
}
dt_owner();
#

and that placeholder doesn't work (%javascript_wg_isowner%)
Maybe someone know how to fix this?

tranquil sapphire
#

whats the placeholder to show world time?

warm topaz
#

%world_<world>_time%

#

smh did u not see it blitz 😅

turbid tide
#

I did actually

#

am looking for something else

warm topaz
turbid tide
#
%player_world_time%
%player_world_time_12%
%player_world_time_24%
#

the one kaliber gave you shows you a specific worlds time. this ones show the time of the world the player is in

late wraith
#

Hey so

#

What exactly is placeholderapi used for

junior musk
#

display information about the player or the server or even other things in plugins which supports it

#

for example, displaying the rank of the player or the online player count in the scoreboard

late wraith
#

Ok thanks

final shadow
#

hey everyone, there is a new PAPI dev build I would like you all to try if you get a chance.. The dev build revamps the command system and after this is tested and ironed out we can move on to other things regarding the update of PAPI.

junior musk
#

👀

slate oar
#

Would anyone happen to know of a placeholder that shows the Total experience earned on a server?

junior musk
#

%player_total_exp% would give you all your current xp, but you said on TAB's discord that you have a system that stocks them somewhere or something like that?

slate oar
#

haha yea i was just there trying to figure this out. I'm currently using %player_total_exp% and whats happening is that when the player dies, that number reverts back to 0. When a player dies in game tho, it shows their score at the top of the death screen with the value I am trying to get in the tab list.

junior musk
#

ah

#

🤔

slate oar
#

which is the total amount of exp that they have earned disregarding deaths

junior musk
#

couldn't find a placeholder for that =/

#

I'll try to check something

#

I may have something

#

/papi ecloud download Javascript
/papi reload
go into your PlaceholderAPI folder in your plugins folder
open javascript_placeholders.yml
add this at the bottom:

totalexp:
  file: totalexp.js

go in the javascripts folder and create a file called totalexp.js and add

function getTotalExp() {
  return BukkitPlayer.getTotalExperience()
}
getTotalExp();

And then /papi reload
then you can use %javascript_totalexp%
@Sebio.#0001

#

try that

#

if it still clears on death, then I don't know if it's possible

#

I'll still have another idea in mind in case

#

@slate oar

#

why is that Discord on phone not mentionning when I want but does when I don't want ;-;

slate oar
#

hi sorry i was eating some dinner. I'll try this out rn

junior musk
#

okay

slate oar
#

okay So i have that all in and gave it a try. So right now, its not reading what my current total exp would be but it's counting my experience, but its still reverting back to 0 after death

junior musk
#

=/

#

last idea I have is using scoreboard objectives

slate oar
#

I was looking into doing that but I have no idea on how to actually set that up.

junior musk
#

/scoreboard objectives add exp xp (or exp idk)

#

then use %objective_score_exp%

slate oar
#

ok so the objective xp acts in the same way as before

junior musk
#

ffff

#

I don't have any other idea =/

slate oar
#

when you die, the xp is classified as score

#

but searching up placeholders for score basically directs be to the papi scoreboard expansion

#

but its all good @junior musk I appreciate your help 🙂

odd jay
#

Whats the opposite of .contains?

#

Anyone knows?

#

I mean, how would it be for "doesnt contain"

#

I think it is with exclamation but not sure where it should go

junior musk
#

I think before the string/variable

#

!yourVar.contains("text" )

odd jay
#

k! I will try, thanks gab

#

works great, thanks again gab

junior musk
#

👍

odd jay
#

What a shorty thumb

junior musk
#

👎

odd jay
#

😂

junior musk
#

🙃 👎

severe coral
#

Anyone experiencing issues with javascript placeholders?

#

particularly: [Server thread/WARN]: [PlaceholderAPI] Failed to set ScriptEngine for javascript placeholder:

mint fable
#

=paste

tender vaporBOT
mint fable
#

send the entire log

severe coral
mint fable
#

umm

#

that is not the entire log

#

?startuplog

tender vaporBOT
mint fable
#

can you also send over the javascript_placeholders.yml

severe coral
mint fable
#

why don't you send entire files

severe coral
#

that's the entire javascript_placeholders.yml file

mint fable
#

that would make sense

#

why are you trying to configure it like deluxemenus

#

O.o

#

hmm

severe coral
#

Its been like that for ages lol

mint fable
#

that's nowhere near correct

#

lemme get the link

tender vaporBOT
mint fable
#

check the wiki

#

you know

#

that's nowhere near correct
that's not right

#

technically it probably would still work, but expression and type are not needed

severe coral
#

ok shortened

mint fable
#

can you still send over the entire startup log?

severe coral
#

to just file

#

yea 1 sec

mint fable
#

it could be due to server stuff

severe coral
#

started happening since 1.16

#

tried with dev build and latest stable, same result

mint fable
#

that is where you should've started

#

@trim mist ?

severe coral
#

sorry, thought it was unspoken about latest version

mint fable
#

latest version is 2.10.6

#

if you are using an experimental build, that should be stated

severe coral
#

yea, we were on 2.10.6 issue arose after 1.16 update

#

tried latest dev build, same result

mint fable
#

can't read minds tho

trim mist
#

Do you have ChatControlPro?

severe coral
#

indeed

mint fable
#

What's the issue there glare?

trim mist
#

Use the jar linked in that comment.

mint fable
#

ah perfect

trim mist
#

I had to make a custom version to work with CCP.

severe coral
#

awesome, thanks Glare

#

will try that

mint fable
#

now I can keep this in mind

severe coral
#

woop woop, that worked. Thanks a lot

#

not sure how niche javascript users are on PAPI

#

but pinning that would help others I'm sure

#

thanks again

mint fable
#

already pinned in my mind

severe coral
#

that meme popped in my head before you posted it lol

mint fable
#

in your head you say?

severe coral
#

oh god inception

odd jay
#

brain power

odd jay
#

how do I put multiple .replaces for one if? I tried ; and going a line under but they won't listen the if, only the first one will listen it

#

Or will I have to put an if for each one?

#

it would be much space wasted if that, but anyways, is it possible?

mint fable
#

are you asking for java? javascript?

odd jay
#

Javascript

mint fable
#

=paste

tender vaporBOT
mint fable
#

send what you have

odd jay
#

is it really needed? Im on phone rn xD

mint fable
#

how am I supposed to help you

#

don't ask questions if you can't help me help you...

odd jay
#

Uh sorry, I will open discord on pc, it takes a while 😂

#

still opening :l

#

https://paste.helpch.at/ugakapekis.bash
So basically is this. Only changed= changed.replace(" 59m",""); will be listened by the if, but the other ones will work alones without any if requirement to run

mint fable
#

you have no brackets

#
if(true){
  //do
}```
odd jay
#

o

#

1 sec and I will update

mint fable
#

if statements without brackets run the next line if true

odd jay
#

Thanks cj89898! It works, sorry for not helping you to help me before, my pc is a potato :l.

mint fable
#

just good to provide details

#

glad it works 👍

odd jay
#

:D, I thought that it would be with another way such as , instead of ; I wasn't expecting the brackets one xD

#

cj, I'm trying to make work the cooldown javascript from the other day, and from now it is going pretty well, I will update if I get it finished without any issues hehe

#

(using the messiest way)

high swift
#

Hello! So I had someone config a plugin for me that uses both 'DeluxeMenus' & 'ChunkClaim'. The result was I can do /claim which opens up a GUI to which I can choose between Claim or Unclaim. However, when you buy a chunk, your next purchase will be 25% higher. This did in fact work when I was in 1.15.2, but since updated to 1.16.1, the placeholders for the Meta don't seem to work. Thank you for your time!

ChunkClaim Config: https://pastebin.com/6mqpeDbT

DeluxeMenues (claim) Config: https://pastebin.com/L2nBJgVm

Imgur of the result: https://imgur.com/a/PbtFM4C

junior musk
#

||actually, it's the placeholders for the meta which don't work anymore||

high swift
#

Ah yeah sry ^

scenic marlin
#

?help

tender vaporBOT
gray ibex
#

where you guys will update placeholders for 1.16 ? Ty 🙂

gray ibex
#

Thank you Waffle 🙂

heady haven
#

Is there a server online status placeholder? for bungee

polar umbra
#

Yo

#

Is there a placeholder that is the amount of slots available in ur inventory?

#

That'd be fairly useful

robust ibex
#

Is there a way to check other players stats? For example, if I put Into my configuration %statistics_mine_block% it shows my amount but i want to see specific players stats. Is that possible?

polar umbra
#

for EZBlocks?

#

Oh it's literally just statistic

#

Yeah idk

robust ibex
#

Well, i wasn't asking you 😂.

polar umbra
#

Ik, i thought it was EZBlocks u were talking about

#

and ik a bit about it cuz I use it on my server lmao

#

I thought I could've helped but nah

mint fable
#

you should be able to use checkitem with air @polar umbra

#

@robust ibex if you type /papi parse <player> <placeholder>

#

if you need a placeholder for it you can use the parseother expansion

polar umbra
#

ty dude

leaden fern
#

official papi 1.16 when 😛

warm topaz
#

theres a pinned dev build in this channel, although nothing official yet

junior musk
#

I'm wondering something with the Javascript expansion, is it possible to hook in other plugins ? 👀 Because I want to check if an offline player has a permission, but hasPermission only works on online players and apparently it is possible with Vault but idk if there's a way to do it without creating an expansion in Java ;-;

warm topaz
#

learn java fingerguns

#

javascript expansion is only really meant for small, little placeholders imo. if ur hooking into other plugins, even if possible with JS, ur best bet is still java

junior musk
#

yeah ik

#

but idk java ;-;

#

and I'm too lazy to learn x)

warm topaz
#

☹️

junior musk
#

no ListPlayers script with list of offline players with permission for u

#

;-;

warm topaz
#

np ill make it in kotlin instead fingerguns

slim talon
#

Hello, I need some help for a problem with the PAPI Spigot Plugin

brisk coral
#

Elaborate

slim talon
#

When I Install the PAPI Plugin in my server it doesn't create any type of Folder for the plugin itself, what can I do?

rotund pendant
#

Upload your latest.log to pastebin @slim talon

warm topaz
#

use the dev build in this channel

#

its built against 1.16.1

rotund pendant
#

Also delete that link, It contains your IP along with someone else's

slim talon
#

Sorry

#

Anyway i solved

rotund pendant
#

Good to know.

slim talon
#

Sorry for disturbing

rotund pendant
#

It's alright, it's what we're here for

slim talon
#

Thx anyway 😄

brisk coral
#

@junior musk You'd have to cache the offline players perms yourself, meaning that's not really efficient (since you can't retrieve perms from an offline player iirc)

junior musk
#

yeah ;-;

#

but apparently

#

it's possible to get the permissions from an offline player with Vault

#

so I opened an issue on the repo of the Vault Expansion to add a had_permission placeholder which supports offline players :D

#

and meanwhile, I've opened an issue on the js expansion repo to update my script in the Community Scripts wiki 🙂

plucky pawn
#

Hi so i was just wondering... i was using Papi ecloud and i was trying to get McMMO. It downloads it, it doesn't show up in my list but the expansion is in my expansion folder.

odd jay
#

||Hello back!
I'm currently writing an if condition that must include a lot of !contains. inside of it to work as intended. And those !contains. contions would consist of a number that jumps from 10 to 10, and I was wondering if there was any way to make a calculation so you don't have to write so many conditions.
So the situation would be something like this:

  if(changed.contains("1d") && !changed.contains("11d") && !changed.contains("21d") && !changed.contains("31d") && !changed.contains("41d") && !changed.contains("51d") ... and it will keep going)
    changed= changed.replace("d","Day");```
So is there any way to make a calculation or something to replace all those `!contains.` conditions with only 1?||
junior musk
#

maybe with regex

#

but idk if .contains supports it

brisk coral
#

I mean just check if there's a d lol?

junior musk
#

true lol

brisk coral
#

There's so many better ways of having plural words than doing what you're doing

odd jay
#

||Nope, because on that part that I sent, I'm checking for d only on the case that the days on the countdown is 1, and the problem which caused me to use multiple !.contains is that in front of the placeholder there isn't any space or something to just replace " 1d" with " 1Day", that's why I'm using this method, anyways, how could I perform that regex way Tanguygab?||

#

||Also I would not be able to just put placeholder == "1d" because it would ignore the other time parameters in case the countdown placeholder contains them||

#

||I will investigate about regex, and see if I can get to do something with it||
Nevermind, I could fix it myself xD 👌

junior musk
#

what if you add a space before the placeholder string, then check for " 1d", so it doesn't count 41d etc... and then you remove the first character of the string which is the space

#

ah

#

oki👍

odd jay
#

what if you add a space before the placeholder string, then check for " 1d", so it doesn't count 41d etc... and then you remove the first character of the string which is the space
That would work on this situation, but not on the entire thing I'm working on, since you would be ignoring the other time parameters (hours, minutes and seconds) and it would break, tho I'm trying my best to finish it how I want. Thanks for helping anywars Gab!

#

anyways* not wars please

junior musk
#

it wouldn't break seconds and minutes since they are after the hours

#

not before

odd jay
#

I mean, it wouldn't actually break, but that condition would only work for 1 specific second (only when the placeholder returns " 1d" it will replace with the thing we want, but before it was " 1d", it was "1d 2h 28m 10s" for example, and on that case it wouldn't be detected by the condition since it only checks that the value of the placeholder is " 1d" ignoring everything after it)

junior musk
#

wut...

#

it checks if the stirng contains " 1d"

#

so...

odd jay
#

The thing is, There is now way to make a space in front

junior musk
#

" " + "%placeholder%"

odd jay
#

actually, that idea also sounds good, I will try that one xD

junior musk
#

x)

odd jay
#

Thanks a lot gab

obsidian charm
#

When papi official 1.16 version?

warm topaz
#

no official version yet, however there is a pinned version that supports 1.16

obsidian charm
#

Ok thank you

trim mist
#

Use dev builds

#

Pinned is old.

warm topaz
#

o wheres the new ones?

trim mist
warm topaz
#

👍

coarse sable
mint fable
#

Hover over Expansions and click Your Expansions @coarse sable

coarse sable
#

Foud it, thanks!

mint fable
#

also, you can refer to that as the eCloud

#

😉

coarse sable
#

How does that rating system work?

mint fable
#

well

#

it doesn't

coarse sable
#

xD

#

Alright, then.

odd jay
#

I finally could make the expiry placeholder! not only with the single feature of telling the whole time parameter (Days instead of d, for example), I've even added some other cool features:

  • When there is 1 as value on a time parameter, then the time parameter's name will change to singular instead of plural (example: 1Days --> 1Day)
  • Parameters are now colored in a degraded light blue to dark gray pattern to indicate which time parameter is longer and which one shorter (Days: light blue;Hours: Turquoise;Minutes: Gray;Seconds: Dark gray)
  • Now to avoid being a really long placeholder, it will only show the first 2 time parameters, so for example, if the expiry is 2days-20Hours-40Minutes-16Seconds, then it will only show Days and Hours, but if there arent days, then it will show Hours and Minutes and respectively. But if the expiry is for example 10Days-30Minutes, then it will only show 10Days since the first parameter is Days and after that it comes Minutes but there arent minutes.
  • Now there is a comma (colored as dark gray) as a separator, and will only appear if there is another time parameter next to it, so if the expiry is for example 10Days-20Hours, then it will show as "10Days, 20 Hours" and if there aren't hours, then it will show like "10Days" without the comma.
    Has been fully tested and works 10/10

I am really glad and happy that I could make it by myself, so I won't bother here again about that topic xD

#

Thanks a lot, Blitz, Cj and Gab!

austere hawk
#

Somebody tell me why it doesn't work 😦

#
var r200 = "%player_has_permission_askyblock.island.range.200%"
var r300 = "%player_has_permission_askyblock.island.range.300%"

function islandRange(){
  if(r300 == "true") { return "&7300 x 300"; }
  else if (r200 == "true") { return "&7200 x 200"; }
  else if (r100 == "true") { return "&7100 x 100"; }
  else { return "&750 x 50"; }
}
islandRange();
#

ok i found my error ... i need to add ; at the end of var --"

#

but don't work ... return every time : 50x50 >_<

#

ok i found ... replace true by yes --"

rain quiver
#

I'm having a problem with my scoreboard.. I'm not sure if it's the scoreboard or the placeholderapi
So everytime i put {placeholderapi_placeholder} it shows nothing and spams this error

[09:46:23 WARN]: org.apache.commons.lang.UnhandledException: Plugin FeatherBoard v4.25.0 generated an exception while executing task 2621
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.AbstractMethodError
at be.maximvdw.featherboard.ci.a(ci.java:287)
at be.maximvdw.featherboard.P.a(P.java:30)
at be.maximvdw.featherboard.cS.a(cS.java:51)
at be.maximvdw.featherboard.cS.a(cS.java:14)
at be.maximvdw.featherboard.api.scoreboard.ScoreboardLine.updatePlaceholders(ScoreboardLine.java:52)
at be.maximvdw.featherboard.api.scoreboard.ScoreboardGroup$AnimationUpdater.run(ScoreboardGroup.java:1)
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:59)
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
... 3 more```
warm topaz
#

make sure ur on latest mvdwplaceholderapi

random hazel
#

When I try to make this javascript placeholder it does not change the placeholder to a different value

#

it is %javascript_greaterThan,10,20%

#
var placeholder;
if (args.length == 2) {
    placeholder = args[0];
}else{
    return false;
}
if (placeholder > args[1]){
    return true;
}else{
    return false;
}
#

this is in the javascript_placeholders.yml file:

greaterThan:
  file: greaterThan.js
#

it doesn't show an error in the console, and I assume no matter what it would either output true, false or an error

turbid tide
#

change it from return true/false to return "true"/"false" for it to return text

random hazel
#

I tried that and I also tried changing the entire javascript to just return "true"; 1 line to troubleshoot but it doesn't seem to register that it is a placeholder in the first place

#

it works when I remove the arguments ,10,20

turbid tide
#

oh

#

try not to declare var placeholder; before

#

just do directly var placeholder = args[0]

#

and see if that could fix it

junior musk
#

the first argument must be separated with a _ from the script identifier

turbid tide
#

oh tang is right

junior musk
#

%javascript_greaterThan_10,20%

turbid tide
#

didn't even notice that

junior musk
#

I did when he said it was working without args x)

random hazel
#

ohh yeah thanks that is working, is it possible to put a placeholder in an argument?

turbid tide
#

yeah

random hazel
#

like {vault_eco_balance}?

turbid tide
#

use {} instead of %%

brisk coral
#

{}

turbid tide
#

yep

random hazel
#

cool

brisk coral
#

You might need to parse it beforehand yourself

limber scroll
#

is there a way to online players in lobby and minigame like
combining these two together
%bungee_bedwarslobby% %bungee_bedwarsgame1%

junior musk
#

you can use the Math expansion

warm topaz
#

%math_{bungee_bedwarslobby}+{bungee_bedwarsgame1}[precision:0]%

junior musk
#

and use the placeholder %math_{bungee_bedwarslobby}+{bungee_bedwarsgame1}[precision:0]%

#

;-;

warm topaz
#

🙂

junior musk
#

mine won't return .000

turbid tide
#

.00*

warm topaz
#

who said mine will 🤔

junior musk
#

:D

#

-_-

austere hawk
#

is it possible to use a javacript placeholder to make an eco take? for example
/eco take {player} %javascript_eco%
or else
/%javascript_eco%
who will send him the order with the amount

turbid tide
#

ugh idk if it will work like that

#

you'll have to try it

#

just make a short javascript like fun test(){ return "eco take n54b 100" } test(); and do /%javascript_eco%

#

I know you can do that in DMenus actions but don't know about other ways

#

if you can actually use it

austere hawk
#

No, that doesn't work and that's exactly what I'm looking for... to use it in dm as an action ^^ so I wouldn't have to create 200 identical code just for calculations ^^

turbid tide
#

well you should be able to

#

just use [console]%javascript_eco%

high swift
#

When will Deluxe Menues be updated to 1.16.1?

#

Well, placeholder wise

#

Im having trouble with the meta placeholder

warm topaz
#

theres a dev build for placeholderapi in this channels pins

#

?dm-builds

tender vaporBOT
warm topaz
#

dev builds for deluxemenus ^

high swift
#

I got Dev-90

junior musk
#

he's using them

#

but the DeluxeMenus PAPI placeholders aren't working

#

the meta ones

warm topaz
#

o

high swift
#

Yeah, Clip doesnt seem to respond so idk where to ask

final shadow
#

hmm

#

what server version

#

@high swift

#

gonna assume 1.16.1

#

can i see the startup log

high swift
#

sure

#

@final shadow But its a cmd, how can I show?

tender vaporBOT
#

@high swift,

high swift
#

sry for long reply, my discord sound is broken

#

oh 1 sec

#

Send you in dm

compact fox
#

Hello where I cant download placeholder api 1.16?

junior musk
#

in this channel's pins

compact fox
#

Thx

final shadow
#

I completely broke ecloud today lol

#

Shout out to pig for fixing it

amber dirge
#

how would i create this economy thing u were talking about before clip?

vivid sparrow
#

What thing?

strong ridge
turbid tide
#

what does /papi parse me %server_online% return?

#

also /papi parse me %vault_eco_balance_formatted% and /papi parse me %tm_tokens_formatted%

strong ridge
turbid tide
#
/papi ecloud download Server
/papi ecloud download Vault
/papi ecloud download TokenManager
/papi reload```
#

execute those commands from first to last

strong ridge
#

It says the expansion cloud is not enabled

turbid tide
#

go here https://api.extendedclip.com/all/ download the Vault, Server and TokenManager expansions then go to plugins/PlaceholderAPI/expansions make sure those expansions aren't already there(if they are delete the existing ones) and add the ones you downloaded to the folder then do /papi reload

austere hawk
#

just use [console]%javascript_eco%
@turbid tide Its working !!!!!!!! 😄

turbid tide
#

nice

austere hawk
#

really thanks you 😄

turbid tide
#

no problem

strong ridge
#

Just did what you said Blitz and it still appears the same way

#

Would a server restart be needed instead of the plugin reload?

turbid tide
#

even when you do /papi parse me ... ?

#

you can try but usually it is not needed

#

but do a server restart

#

just in case

strong ridge
#

yep the parse command still displays the same message

turbid tide
#

ugh that's weird do those expansion show in /papi list

strong ridge
#

for some reason no

#

Gonna see if the restart is gonna do anything

#

Yeah that didnt do anything

turbid tide
#

what's your PAPI version?

#

also your server version

strong ridge
#

1.13.2 and the papi ver is 2.9.2

turbid tide
#

ugh why are you using such an old version of PAPI?

tender vaporBOT
turbid tide
#

just update to latest ...

#

that's why your ecloud is not working

strong ridge
#

We never had an issue with it before, hence why we haven't updated it

turbid tide
#

well you should xD

strong ridge
#

Yeah will do that rn xD

#

Okay plugin has been updated and I re-run the ecloud download commands

#

It said they were successfully downloaded (except for TokenManager, it says no expansion found with that name)

#

when I did /papi list they still werent on there

#

I also did /papi reload after downloading

strong ridge
#

Quick update I managed to get everything to work but now every time I do /papi reload it unregisters all the expansion

#

I noticed that this was a bug brought up before on github

dusty knot
#

does papi support bungee

junior musk
#

nope

dusty knot
#

well

#

then

#

I'm gonna have to set out of papi

trim mist
#

Okay.

mental night
#

idk what ur gonna use as a replacement 😆

trim mist
#

Bungee support is in the works, but it'll be awhile. V3 initial launch is planned to be Bukkit, Nukkit, and Sponge.

icy sonnet
#

i using Statistic placeholder
but have bug the placeholder result is arriving in duplicate

#

for example:% statistic_mine_block%
when you mine 1 block, the result shown is that you mined 2

mint fable
#

are you positive?

#

How have you tested the placeholder? And how do you know that the player has only mined 1 block?

icy sonnet
#

I performed the test with myself, and with another player with default permissions,
I used the; holograficsdisplayers; to display the value
latest versions
server paper 1.16.1 latest

mint fable
#

Are you on the pinned version of papi?

icy sonnet
#

I believe that if you test with these conditions you can get the same error

mint fable
#

Type /papi parse me <placeholder> to test it instead

#

And how do you know the player has that many mined blocks? did you open the stats file?

#

I know you tried with a "default" player, was it also their first login?

#

the statistics plugin should be getting it directly from minecraft, so maybe you have a plugin duplicating it

icy sonnet
#

after using the top command you sent, it reflects the same result, despite not having any other plugin, I tested it with just 2

#

the player had already entered at least 1 time, and was already registered

mint fable
#

do you have latest expansion as well?

#

you can run /papi ecloud download statistics to make sure

icy sonnet
#

yes 1.9.2

mint fable
#

don't forget to /papi reload

#

gonna take time for me to setup 1.16 server

icy sonnet
#

yes i reloaded with /papi reload

#

i used /papi parse me %statistic_mine_block%

mint fable
#

and what plugins do you have again?

#

how is it an odd number if it reports double?

icy sonnet
#

just luckperms, placeholdersapi, vault, protocollib, worldguard, worldedit, skins restorer, mycommand, essentialsx, ultimatekits, ultimatechat

mint fable
#

that's a lot

#

you said you tested with just 2

#

which 2

icy sonnet
#

yes, always an odd number

mint fable
#

even for your friend?

#

he had 0, then 1, then 3?

#

or 0, then 2, then 4?

icy sonnet
#

luckperms and holograficsdisplayers

mint fable
#

just 2

#

that's 3 at minimum

#

placeholderapi counts 😉

icy sonnet
#

yes excuseme

#

he had 0, then 1, then 3

#

and for my friend it also has the same sequence with odd numbers

mint fable
#

Are you on the pinned version of papi?
@icy sonnet

#

never got a reply unless i missed it

icy sonnet
#

using 2.10.7-DEV-90

mint fable
#

update

icy sonnet
#

ok 1 moment

mint fable
#

let's see

#

it does double

icy sonnet
#

yes for me it's doubling, even with the DEV-94

mint fable
#

idk who to ping

#

maybe @final shadow

#

statistic mine_block doubles in 1.16

#

not sure about others

#

except not doubles, because Luiz has odd numbers, it goes up by 2 each block mined though

vivid sparrow
#

because multiple materials share the same value, for example GRASS, DIRT and SOIL

mint fable
#

oh boy

#

I had only grass and stone

icy sonnet
#

stone doubling for me

#

wood

#

I wait for a reply from the clip now?
if so, you can ping me to trigger me
Thank you for your help

zealous shadow
#

does the plugin work in 1.16?

warm topaz
#

check pinned messages

zealous shadow
#

thx

icy sonnet
#

i found another issue in other clip plugin

#

i send in discord channel

static vapor
#

Guys

#

is there any way to add placeholder values?

inner rampart
#

[PlaceholderAPI] Skywars is currently using a deprecated method to hook into PlaceholderAPI. Placeholders for that plugin no longer work. Please consult [] and urge them to update it ASAP
How do I update this?

brisk coral
#

Tell the author of the plugin to update his shit

inner rampart
#

It Skywars or PAPI?

brisk coral
#

Skywars

inner rampart
#

Okay, thx

olive dragon
#

Does placeholder-api work in 1.16?

#

nvm found it thanks!

hollow kettle
#

Hello, is it possible to connect the placeholder (% statistic_hours_played%) with MySQL?

final shadow
#

@round lichen moving our conversation here. Lmk when ready and I’ll hop on my pc

carmine veldt
#

@final shadow feel free to add him to #papi, that's basically the papi chat now

#

not just for papi 3 anymore

final shadow
#

Ah yeah our papi chat

#

Let’s move there

#

What role is it? Papi contributor?

#

@carmine veldt

carmine veldt
#

I don't think it has a role

#

individual perms on the channel

final shadow
#

Ah ok

#

u should see it now i tagged you

austere hawk
#

Hi, is it possible to make another placeholder lowercase using the %formatter_text_lowercase_<text>% placeholder?

warm topaz
#

id assume u can replace <text> with a placeholder

austere hawk
#

I've tried that but that doesn't work.

warm topaz
#

did u try like %formatter_text_lowercase_{placeholder_without_%%}%?

austere hawk
#

No, i'll try that.

#

It works. Thank you @warm topaz!

warm topaz
#

awesome

austere hawk
#

I have another question. Is it possible to check what item a player has in their head/helmet slot?

mint fable
#

@junior musk you there?

junior musk
#

yup

mint fable
#

%javascript_listplayers_<type>,<subtype>,<yes/no>,<output>,<subtype value>% is everything required?

junior musk
#

the last one isn't if you use normal subtype

mint fable
#

perfecto

junior musk
#

I'll try to make some more explanation before you put it on the wiki if you want

mint fable
#

what is the yes/no

junior musk
#

if you're counted in the list or not

royal parcel
#

i need help with js. i want to parse placeholder but i don't know. i just know parse Int placeholder parseInt

junior musk
#

type is the list of players, subtype the type of filter, yes/no if you're counted in the list or not, output is what you will get in return (the list, the amount or a player) and subtype value is the filter

#

i need help with js. i want to parse placeholder but i don't know. i just know parse Int placeholder parseInt
PlaceholderAPI.static.setPlaceholders("player", "text*);

royal parcel
#

okey thanks

#

so player i need replace to %player_name% and text is placeholder right ?

final shadow
#

yes

junior musk
#

BukkitPlayer works too

#

without the ""

royal parcel
#

oh okey xD i'm new at js

junior musk
#

it's all good =)

royal parcel
#

is this right if placeholder parse blank line ?

if (status == null)

junior musk
#

I think it would be "" instead

mint fable
#

does that look right

#

i wanna make sure i didn't miss anything

junior musk
#

Looks good

#

oh

#

add the + thing

mint fable
#

i'll add more to the first example but who

junior musk
#

for multiples worlds and perms

mint fable
#

It's there down below

junior musk
#

ah yup

#

👍

#

sounds good to me

#

thanks =)

mint fable
#

should be all updated 👍

royal parcel
junior musk
#

don't put the PlaceholderAPI.static.setPlaceholders.... in ""

#

also, you could have simply put the placeholder in ""

#

no need of the PlaceholderAPI.static.setPlaceholders thing

royal parcel
#

var status = %guilds_name%; like this ?

junior musk
#

yup

royal parcel
#

stil not work

junior musk
#

I'm not on my computer right now, I can't really check =/

royal parcel
#

okey i found it

#

i missing ""

#

var status = "%guilds_name%";

#

thank you very much

junior musk
#

👍

royal parcel
junior musk
#

I'd like to have the answer too because I tried but didn't find how x)

royal parcel
#

have any way to pass 16 max character in scoreboard ?

hollow kettle
#

Hello, is it possible to connect the placeholder (% statistic_hours_played%) with MySQL?

junior musk
#

update to 1.13 or above

#

or else there's still another way but idk how to do it and I have only saw the plugin TAB Premium do it

#

Hello, is it possible to connect the placeholder (% statistic_hours_played%) with MySQL?
I don't think that's possible

#

as your statistics are stocked in your playerdatas in yopur world folder

final shadow
#

One option is finding a stat plugin that records blocks broken via MySQL

#

The stat expansion will never go outside the scope of basic Minecraft statistics though

final shadow
#

Haha idk why i manually built this on jenkins but everyone should test this with me

#

seems to work good on my end

#

havent tested everything yet but if there are small issues we will work those out

austere hawk
#

Is there a placeholder which allows you to see for example the nbt data of the item you are holding or an item on your helmet armor slot?

night owl
#

All my expansions are automatically unregistered with every reload and restart. Registering them manually works, but only until the next reload. How do I fix this?

night owl
#

Already fixed it: one of the expansions was outdated, causing the others not to load correctly

icy sonnet
#

@mint fable hi
sorry for the ping.
I didn't understand, was there any correction for the placeholder?

tender vaporBOT
#

@icy sonnet,

mint fable
#

bruh

#

?tryandsee

tender vaporBOT
mint fable
#

@icy sonnet ^

#

I'm going to say probably not because there hasn't been an update in #ecloud-updates

sharp granite
#

Hey so i am updating a plugin i did not make that used placeholderapi back in 1.9 can some one help me undestand how i could fix this ?

warm topaz
#

that uses the old method to hook into papi believe

sharp granite
#

yes i looked at it

#

but i don't understand why this plugins extends a ezplaceholders

warm topaz
#

because its the old method

#

u extend PlaceholderExpansion now

sharp granite
#

ah ok

#

so i guesse that the hook function does not exist in that expansion ?

#

is there a javadoc ?

warm topaz
#

it wont work in the later versions for papi no

#

theres only the wiki i believe

#

unless u want to go through papis source

sharp granite
#

yeah im having a hard time because i never worked with placeholder before and i did not make the code that i am trying to update

warm topaz
#

honestly the wiki tells u everything

#

ive only just started coding and found it really easy to hook into papi. it shouldnt cause u much trouble

sharp granite
#

i will look into it thanks

warm topaz
#

np good luck

clear anvil
#

anyone know around when 1.16 is released?

leaden kraken
#

check pinned messages

sinful grail
#

How do I make it when a placeholder returns no string value, it shows "None"?

balmy marten
#

javascript placeholders probs

turbid tide
#

everyone that has your plugin will have to download

#

the expansions

#

themselves

#

only those they want to use

hollow patio
#

so all i have to do is add the jar and papi as a depend right? (not counting ``package at.helpch.placeholderapi;

import me.clip.placeholderapi.PlaceholderAPI;``)

hollow patio
#

yeah i was on there

#

the plugin is for personal use anyway

warm topaz
#

all u do is import the package as u did then then use the setPlaceholders() method on ur message

#

then papi will do the rest

austere hawk
#

is it possible to use 2 different placeholders from a single javascript file?

turbid tide
#

you can use arguments and based on the argument return 2 different things or soemthing

austere hawk
#

this can work ?

#

function ecotake(){
  return "eco take %player_name% " + team * 50000
}
ecotake();

function ecoshow(){
  return "" + team * 50000
}
ecoshow();```
#

and use %javascript_ecotake% & %javascript_ecoshow% ? ^^

#

or i need to create 2 files ?

#

(nop don't work xD)

junior musk
#

made this way, it can't work

#

but you can do as Blitz said to make it work

austere hawk
#

i don't know how, i'm starting with javascript placeholder ^^

junior musk
#

2sec

#
var team = "%askyblock_team_size%";

function ecotake(){
  return "eco take %player_name% " + team * 50000
}

function ecoshow(){
  return "" + team * 50000
}

if (args[0] == "take") {return ecotake()}
else {return ecoshow()}
#

try that

austere hawk
#

oh ok ty i try 🙂

junior musk
#

also

#

you'll have to use %javascript_<nameOfTheFile>_take%

#

or %javascript_<nameOfTheFile>_somethingElse%

#

wait I'll do something better

austere hawk
#

ok I understand 🙂

#

ok ^^

junior musk
#
var team = "%askyblock_team_size%";

if (args.length >= 1) {
    var args0 = args[0];
}

function ecotake() {
  return "eco take %player_name% " + team * 50000
}

function ecoshow() {
  return "" + team * 50000
}

if (args0 == "take") {
    return ecotake()
}
else if (args0 == "show") {
    return ecoshow()
}
else {
    return "Specify 'take' or 'show'"
}
austere hawk
#

wow ^^

junior musk
#

there are things that shouldn't be needed but it's to make it better looking 😄

#

what's the script identifier ?

#

the name that you used in the javascript_placeholders.yml file

#

%javascript_<scriptIdentifier>_show% %javascript_<scriptIdentifier>_take%

#

that's how it should work

austere hawk
#

ecoteam the name of file :p

junior musk
#

ok then replace <scriptIdentifier> by ecoteam

#

and it should work

austere hawk
#

don't work:( and no error :\

junior musk
#

what does it show ?

austere hawk
#

%javascript_ecoteam_show%

junior musk
#

can you send your javascript_placeholders.yml file ?

austere hawk
#

my bad i add a S --"

#

but now error java ^^

junior musk
#

👀

#

can you send the error ?

#

=paste

tender vaporBOT
austere hawk
junior musk
#

I'll try on my side

#

yeah ok I'm really stupid x)

#
var team = "%askyblock_team_size%";

function ecotake() {
  return "eco take %player_name% " + team * 50000
}

function ecoshow() {
  return "" + team * 50000
}
function ecoMain() {
    if (args.length >= 1) {
        var args0 = args[0];
    }

    if (args0 == "take") {
        return ecotake()
    }
    else if (args0 == "show") {
        return ecoshow()
    }
    else {
        return "Specify 'take' or 'show'"
    }
}
ecoMain()
austere hawk
#

yea its working 😄

#

ty a lot for help & for learning 🙂

junior musk
#

👍

#

||I can explain a bit more what I did if you want :D||

austere hawk
#

oh yes 😄 can you send me a PM ? I'm leaving work now, so I'm gonna go offline ^^

junior musk
#

oki

vivid sparrow
#

@junior musk pls dont use else if

junior musk
#

;-;

vivid sparrow
#

and if you do place them after } of the previous statement

warm topaz
#

ew

vivid sparrow
#

plus, you have to define args0 outside of the functions 🙂

junior musk
#

oh true

#

pls dont use else if
but idk how to use it another way ;-;

warm topaz
#

is case switch a thing in js? idk

#

or u can use the ? : things, but idk how that works with else if

vivid sparrow
#
var teamSize = parseInt('%askyblock_team_size%');

function funct() {
    if (args.length === 0) {
        return "Specify 'take' or 'show'"
    }

    var amount = teamSize * 50000;

    if (args[0] === 'take') {
        return 'eco take %player_name% ' + amount;
    }

    return amount;
}

funct();```
#

is case switch a thing in js? idk
@warm topaz yes

#

but why use switch for 2 values

warm topaz
#

¯_(ツ)_/¯

hollow patio
#

all u do is import the package as u did then then use the setPlaceholders() method on ur message
i dont wish to use placeholders in the plugin but rather in the config.yml

#

how would i handle this?

vivid sparrow
#

PlaceholderAPI#setPlaceholders()

warm topaz
#

the exact same way

hollow patio
#

could you please give me an example?

vivid sparrow
#
String name = PlaceholderAPI.setPlaceholders(player, "%player_name%");```
#

though my suggestion would be to use actual methods as much as you can, instead of placeholders

hollow patio
#

im not trying to make placeholders

vivid sparrow
#

?

warm topaz
#

what

vivid sparrow
#

setPlaceholders() will replace all placeholders from the given String and return a new string with values instead of placeholders

#

I think you are confusing yourself.

warm topaz
#

get the value string from config
String name = PlaceholderAPI.setPlaceholders(player, configValueString);

hollow patio
#

im trying to hook into papi using eclipse, i actually want to use external expansions (placeholders from other plugins)

#

i dont get it

warm topaz
#

this is how

hollow patio
#

yeah but how can i use placeholders that i didnt put in the plugin (placeholders i downloaded from the ecloud)

warm topaz
#

😐

vivid sparrow
#

._.

warm topaz
#

the setPlaceholders method already does that for u

hollow patio
#

yeah but why String name = PlaceholderAPI.setPlaceholders(player, "%player_name%"); specifically, thats what's confusing me the most

leaden kraken
#

setPlaceholders will set any placeholder that exists in PlaceholderAPI

hollow patio
#

i mean it could just be an example so i suppose

leaden kraken
#

That's an example

warm topaz
#

thats just an example message

#

yea

vivid sparrow
#

Read the wiki,

hollow patio
#

i did

vivid sparrow
#

There's only one method you have to use, that one

austere hawk
#

Hey i had some problems with the luckperms expansion on my 1.15.2 spigot server. I did the command /papi ecloud download luckperms and after that /papi reload and this happend......

junior musk
#

update LuckPerms

austere hawk
#

i use the latest luckperms bungeecord version

junior musk
#

you need it on Spigot too

#

PAPI can't interact with Bungee plugins

austere hawk
#

oh rly

junior musk
#

yup

austere hawk
#

i didn't know that

junior musk
#

and it's really necessary to have LP on Spigot too because if it was only on Bungee, it wouldn't manage Spigot permissions

austere hawk
#

ok, thanks

austere hawk
#

hi, i have an issue

#

statistic placeholder isn't working, even though i've downloaded the expansion multiple times

warm topaz
#

whats ur server version?

austere hawk
#

1.8.8

warm topaz
#

/papi ecloud download statistic 1.7.0

austere hawk
#

works now, thank you

warm topaz
#

or try the expansion in the pinned messages

#

np

ornate falcon
#

Is it possible to have a placeholder within a placeholder?

mint fable
#

depends

#

the placeholder has to support it

#

which one?

mint fable
#

not sure, but if you can, it's probably {placeholder}

#

you can also try [placeholder]

#

or you can use parseother

#

if that would help

ornate falcon
#

I'll look into it

#

Basically what I'm trying to do is display a world prefix in the tab-list that is only visible by staff members.

mint fable
#

probably can use parseother than

#

%parseother_{user}_{player_has_permission_<permission>}%

#

and you can also use a placeholder for the username

distant apex
#

Hi! When will this be ready for 1.16?

mint fable
#

Check pinned messages

distant apex
#

Where are those?

mint fable
#

the pin icon top right

distant apex
#

Ok thanks!

ornate falcon
#

When using parseother, do i need to include % when selecting a user from a placeholder?

warm topaz
#

no

#

placeholders with {} inside them, remove the %% for the placeholder inside {}

ornate falcon
#

How does it determine whether it's a username or a placeholder?

warm topaz
#

¯\_(ツ)_/¯

#

magic

ornate falcon
#

hmm

#

So if i had a username that was the same as a placeholder it would error?

warm topaz
#

🤔

heady compass
#

iun deluxemenus what placeholder should I use for console commands

#

like if Im giving a player an item

#

%player_name% doesn't work for some reason

warm topaz
#

/papi ecloud download Player
/papi reload

heady compass
#

ahh thanks

warm topaz
#

no problem

flat dragon
#

Hey does anyone know why my placeholder is showing "§" on my Featherboard scoreboard?

#

Im on 1.8 and the placeholder im using is {placeholderapi_voteparty_votes_required_party} from Voteparty

mint fable
#

@junior musk updated your js btw

junior musk
#

thanks 👍

reef sparrow
#

hi, new to this placeholder so please forgive my ignorance. I'm trying to have a gui run a command to open a backpack gui. the command is /backpack. I've used backpack %player_name%

#

but it's not working

#

the backpacks opening but it's saying %player_name% instead of the players name

brisk coral
#

Run these two commands
/Papi ecloud download player
/Papi reload

reef sparrow
#

sorry, where do i run those? on my server? what does it do, please can you explain

brisk coral
#

It downloads the expansion (in this case the player one, since you're using a placeholder from the player expansion) (identifiers usually being the first word in the placeholder - ie. %vault_eco_balance% would be a placeholder from the vault expansion)

reef sparrow
#

ty

ebon tapir
#

Hello the world api wont show up ingame for me. its downloaded and in the extensions folder just wont show up in game

#

also what placeholder should i use for showing remaining players alive in a hunger games

wet basinBOT
warm topaz
#

if u give players a permission when theyre dead, u can use the listplayers expansion

#

also @balmy marten kek

tender vaporBOT
#

@warm topaz,

balmy marten
#

ping pig not me

#

his issue

warm topaz
#

@carmine veldt kek

cobalt kraken
#

is there a way to use hex with Papi yet? I saw issue 343 was closed but even on the dev branch Im getting the same issue.

brisk coral
#

Where are you parsing the placeholder?

cobalt kraken
#

Lucky perms chat prefix.

#

Probably have gotten this question before.

brisk coral
#

Does the chat plugin support hex? And if so does it use the same format?

cobalt kraken
#

I mean its deluxechat. I'm guessing not

#

From the update logs, the 1.16 version is more so it doesn't break I'm guessing

balmy marten
#

Deluxechat doesnt support hex colours yet.

#

But it's being worked on and will be released soon™️

cobalt kraken
#

Understandable. Thank you very much! was weird to get hex working on my own chat plugin so I get the workload needed.

ornate falcon
#

Can i set a placeholder to countdown every 12 hours?

#

My server restarts on a schedule every 12 hours.

pure sundial
#

hm I have a question

#

I use tab plugin on my server

#

and I downloaded the math api

#

in tab it shows double the amount of health that is actually there

#

so for 10 hearts it says 20

junior musk
#

because it counts as half heart

turbid tide
#

1 heart = 2 health

pure sundial
#

is there a way to use math so that it can make it show the actual numbers based on hearts

#

not double

turbid tide
#

%math_{player_health}/2[precision:0]%

pure sundial
#

ty

junior musk
#

didn't NEZNAMY already show you a placeholder? 👀

pure sundial
#

he did