#placeholder-api

150650 messages · Page 26 of 151

soft shadow
#

idk how to find the exp vers

#

you don't need an expansion for factionsuuid

brisk coral
#

asking about the javascript expansion version

#

Also what chat plugin are you using

soft shadow
#

dchat

brisk coral
#

Can you show me the config for it

#

=paste

tender vaporBOT
soft shadow
#

1.6.0

#

with your code i made the prefix prefix: '%javascript_toupper% '

brisk coral
#

Yeye that's correct, everything seems fine, most likely cause it's an internal placeholder so something might be cucked

soft shadow
#

oh I think it's because it's a Relational Placeholder

#

it works with placeholders that aren't relational

#

dang

brisk coral
#

Can you not just change it in the factionsuuid config?

soft shadow
#

no i can only change it's chat color

#

I changed it in lang

turbid tide
#

wait why you didn't use my code?

#

it was just one line args[0].toUpperCase() and should've worked

#

this is how you would've called it %javascript_toupper_{rel_factionsuuid_relation}%

austere hawk
#

how come i always get this error when stopping server

mental night
#

#spigot-linking

#

for support on deluxechat

#

wait

#

im dumb ignore me

#

id say try using the dev build of placeholderapi but i could be wrong

earnest sky
#

Can anyone tell me the placeholder for all players online

#

This is for a server running velocity proxy

#

pinger_players_play.surrealcraft.net

#

does not seem to work

turbid tide
turbid tide
earnest sky
#

BungeeQuack? @turbid tide

turbid tide
#

^

earnest sky
#

Will test

#

It works flawlessly thanks @turbid tide you're incredible

novel moss
#
function getIsKit(){
  var kit = %essentials_kit_is_available_args[0]%;
  if(kit === "no"){
    return "nu";
  }
  if(kit === "yes"){
    return "da";
  }
}

This shows "nu" everytime, doesnt matter if kit is yes, and i dont know why.. help please 🙂

turbid tide
#
function getIsKit(){
  var kit = PlaceholderAPI.static.setPlaceholders("%essentials_kit_is_available_" + args[0] + "%");
  if(kit === "no"){
    return "nu";
  }
  if(kit === "yes"){
    return "da";
  }
}```
novel moss
#

oh

#

first time using js expansion

#

thanks lol

#

sigh

turbid tide
#

also that entrire code is just a waste

#

you could just use arguments for the entire placeholder

novel moss
#

wdym

turbid tide
#

gimme 3 minutes to finish this game

novel moss
#

xd sure

#

nvm i fixed the error but its still shows only no

turbid tide
#

ok so my question is why have all that code

#

when you can just have this

#
  if(args[0] === "no") "nu"
  if(args[0] === "yes") "da"```
#

this is literally all the code you need

brisk coral
#

Blitz leave

turbid tide
#

why?

#

yes I know I could just not use second if

brisk coral
#

Because.

turbid tide
#

no u leave

#

here

#

even better code

mental night
#

LEAVE

turbid tide
#
if(args[0] === "no") "nu"
"da"
#

this is js ^

#

xD

brisk coral
#
args[0] === "no" ? "nu" : "da"
mental night
#

ha

turbid tide
#

or that

brisk coral
#

If you really wanna cut the bullshit

turbid tide
#

I guess

mental night
#

or

#

args[1] +++ "yes" / "nu | "two"

turbid tide
#

what

#

you ok?

mental night
#

ok

turbid tide
#

so @novel moss this is the entire code you need in your js file args[0] === "no" ? "nu" : "da"

mental night
#

made by blitz stolen by frosty

turbid tide
#

and you call the placeholder like this: %javascript_iskit_{essentials_kit_is_available_daily}% for example

turbid tide
mental night
#

i would never lie

turbid tide
#

I trust you

brisk coral
#

You ain't ever seeing MT Sellinq.

turbid tide
#

MT?

brisk coral
#

MessageToggle

turbid tide
#

K Sellinq fixing MT for you rn

#

xD

mental night
#

Yay

novel moss
#

Ohhh

#

Yeah thats very smart

#

Not for me

mental night
#

MessageToggle shall see daylight!

novel moss
#

Lemme try

brisk coral
#

Watch it not work

turbid tide
#

it will

novel moss
#

Guess what

#

It works

#

Thanks :)

turbid tide
#

👍

hexed ore
#

For some reason my redis bungee placeholders are not working

#

/papi parse me %redisbungee_total% comes out to 0

bitter steppe
#

is there any difference to the following in order to obtain the value of a placeholder? do they all do the exact same thing? is there any reason to use the other methods instead of just using the top one which is the simplest?

"%player_ping%"
PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%player_ping%");
PlaceholderAPI.parsePlaceholders(BukkitPlayer, "%player_ping%");
papi.parsePlaceholders(BukkitPlayer, "%player_ping%");
hexed ore
#

is there any extra setup for redisbungee expansion to work? I dont understand

karmic marsh
#

lol ok so does PAPI have a limit on the length of a number? When I use the following condition it breaks after the returned value gets too high (idk the exact limit)

type: '>='
input: '%ecogens_player_stock_owned_raw%'
output: 1
hexed ore
#

oh wait I see

#

I am on 1.8.8 I need an older ver

#

topkek

#

cool works now

karmic marsh
turbid tide
#

I don't think its papi

#

its the expansion you use

#

they probably used an integer and not a long

#

which I thin has a limit of 2.2B or something

safe vault
#
function getPos(outPos) {
    var arr = [];
    for (i = 1; arr.length < outPos; i++) {
        var name = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%parkour_leaderboard_" + args[0] + "_player_" + i + "%");
        //arr.push(name);
        return name;
    }    
}

getPos(1);

/papi parse me %javascript_leaderboard_svarta% returns Invalid syntax

/papi parse me %parkour_leaderboard_svarta_player_1% returns MaximMaximS

tender vaporBOT
#

@mossy helm,

turbid tide
#

ugh didn't you say it works correctly? Let me see if I still have it saved somewhere

#

try this then

novel moss
#

is update_interval capped at 10 seconds? cause it just wont update every second for me, only every 10 seconds

turbid tide
#

you talking about deluxemenus?

#

then no its 1

novel moss
#

yeah mb

bitter steppe
green cloud
#

why arent my placeholders working in gui plus?

hollow marlin
#

Hii, I would like to know if this is good:
´´´ - 'console_command: summon Fireball %player_x% %math_{player_y}+10% %player_z%'´´´

It sais that it can not be summoned out of the world

safe vault
#

OMG pls can somebody help me???

brisk coral
#

How about you wait patiently untill someone helps, when someone has time and knows the answer to your question, they'll help.

safe vault
#

ok, it just looks like you are ignoring me

mental night
#

We dont have to help if we dont want too

#

🤷‍♂️

#

People have lifes too

#

or maybe some dont understand

#

take in all the equations

turbid tide
#

Ye

#

or you could all just ignore him

#

he literally just sent 2 messages. he been waiting for a while

turbid tide
#

so one problem might be that you're trying to return multiple variables which I don't think its possible

#

also I think you have to parse i to a string

#

I'm not that good with java but from a quick look that's how it looks

mental night
safe vault
#

wait

#
function test() {
    var i = 1;
    var name = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%parkour_leaderboard_" + args[0] + "_player_" + String(i) + "%");
    return name;
}

test();

also Invalid syntax

turbid tide
turbid tide
safe vault
#

hmm

#
function test() {
    var i = 1;
    var name = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%parkour_leaderboard_" + args[0] + "_player_" + i.toString() + "%");
    return name;
}

test();```

still not
turbid tide
#

what if you just use ```js
function test() {
var name = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%parkour_leaderboard_" + args[0] + "_player_1%");
return name;
}

test();```

#

does this fix it?

#

because we need to know if its the i that breaks it

brisk coral
#

#toString() is useless btw Blitz

safe vault
#

so the problem is with toSting()

turbid tide
#

hmm so it is the i that breaks it

#

well if Frosty is right you should just be able to use + i +

#

no need to parse

safe vault
#

that doesn't work

turbid tide
#

hmm

#

can you not parse it?

#

just show it

#

as it is

#
function test() {
    var name = "%parkour_leaderboard_" + args[0] + "_player_" + i + "%"
    return name;
}

test();```
safe vault
#

wdym with show it?

turbid tide
#

just use that

#

and tell me what it shows when you parse

turbid tide
#

yes

#

I just want to know what it returns

#

like the text

#

if it works or not

safe vault
#

invalid snytax

turbid tide
#

so Frosty what were you saying about that .toString() not being necessary? xD

brisk coral
#

It's not

turbid tide
#

well

#

then why does he get InvalidSyntax? wait fuck I just realised

#

...

#

@safe vault how are you calling the placeholder?

safe vault
#

/papi parse me

turbid tide
#

ye

#

but the actual placeholder?

#

%javascript_something...something%

#

how does it look?

turbid tide
#

you didn't understand me again

#

/papi parse me %javascript...

#

what do you type therE?

#

after papi parse me

safe vault
#

check the whole message

mental night
#

do /papi parse me %javascript_yourplaceholder%

turbid tide
#

wait but which gives you wrong syntax?

#

the first one or the second one?

safe vault
#

itz here

#

/papi parse me %javascript_leaderboard_svarta% returns Invalid syntax

/papi parse me %parkour_leaderboard_svarta_player_1% returns MaximMaximS

#

i sent that already

#

the issue is with that i

safe vault
#

can i somehow log to console?

safe vault
#

IDk

#

i managed to get it working

#
var holder = "%" + "parkour_leaderboard_".concat(args[0], "_player_", i.toString()) + "%";
var name = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, holder);

unreal glade
#

So I am having a few problems and I do know some of it has to do with papi, but I just restarted my server to update a few configs and this happened http://prntscr.com/vrcxtk
I restarted a second time and nothing worked, couldnt type in chat run any commands. Anyone have any suggestions? Here is my console log https://paste.helpch.at/adunazuluc.md

turbid tide
#

ok so a few plugins not working because Skript still mising, one is using a deprecated method (IControlU), no idea what's up with PickupMoney and then the fun starts

unreal glade
#

So remove IControlU?

turbid tide
#

ugh idk if that is causing that

#

but a lot of errors after

#

let me see

#

what I can understand

#

are you sure you still have Disk Space on your server?

#

if yes then redownload ShowItem. Seems like is missing some things.

#

ChestShop is not working because ShowItem is not working

#

hmm

unreal glade
#

I was trying to clean up my console and clear the errors.

turbid tide
#

iDisguise sends like 100 erors

#

its trying to retrieve info for some profiles but something they don't exist or something

unreal glade
#

I was going to remove iDisguise, And the server has plenty of storage.

turbid tide
#

ye then redownload ShowItem. you might have gotten a corrupted jar

#

ok so DeluxeChat error lets see

#

what's your server version?

unreal glade
#

1.12.2

turbid tide
#

oh ye missed that. its there

#

hmmm

#

can you also redownload DChat?

#

and see if a new build fixes that eror

#

also

#

%pl_prefix%player:%pl_suffix %message are wrong

#

I assume that's how you've set the placeholder in DChat?

unreal glade
#

Yes I can, give me just a moment, So remove ID, ShowItem and reinstall, same with deluxechat.

#

And no

#

That's completely new.

turbid tide
#

ugh

#

you got another plugin that can format the chat?

unreal glade
#

Something is interfereing but I have no clue what placeholders pl is.

turbid tide
#

oh wait pl_prefix. isn't that chat control?

unreal glade
#

Chat control has the directory still but the .jar is gone.

turbid tide
#

[16:29:14] [Server thread/ERROR]: Ambiguous plugin name ChatControl' for files plugins/ChatControl-Free-5.9.1.jar' and plugins/ChatControl.jar' in plugins'

#

not what the logs say

#

you got 2 Chat Control jars

#

by the looks of it

unreal glade
#

Interesting.

#

Let me check my FTP

#

Okay you were right, they were still there, but with an extra.

#

Now what?

#

I just removed IControlU, iDisguise, and about to remove showitem

turbid tide
#

you removed ChatControl as well?

unreal glade
#

Yep.

turbid tide
#

if yes then restart

unreal glade
#

Both files.

turbid tide
#

and send another startup log

unreal glade
#

Alright

#

The new startup log

#

DeluxeChat is having issues and so is ShowItem still

#

And chestShop

turbid tide
#

well chest shop doesn't work becasuse ShowItem doesn't

#

and IControlU

#

is still having problems

#

I think that plugin needs updated

#

because is using some deprecated methods

#

wait

#

u sure this is a new startup log?

#

because you still got IDisguise

unreal glade
#

Hmmm

#

One second

turbid tide
#

this seems to mee like its the old log

#

yep it is [16:29:14] [Server thread/ERROR]: Ambiguous plugin name `ChatControl' for files `plugins/ChatControl-Free-5.9.1.jar' and `plugins/ChatControl.jar' in `plugins'

unreal glade
#

Theres the new one

mint fable
#

don't use plugman

#

you should be doing a full restart when making changes

#

Also is the issue still PAPI or now more focused on DeluxeChat?

unreal glade
#

I would say both, a couple extensions are not updating, Those are Bungee, Player and playerinfo

mint fable
#

lots of errors here

#

chestshop, pickupmoney, deluxemenus, galistener, idisguise, cs-corelib, holographicdisplays, deluxechat

#

1st step: plugman can break a lot of plugins, don't use it

unreal glade
#

Yeah, I was working on clearing and fixing them

#

I'm aware of that, I think one of my staff added it.

#

Which I need to talk to them about it.

turbid tide
#

wait you're using plugman?

mint fable
#

I believe the dev build of deluxechat should work on 1.12.2 if you want to try it @unreal glade

#

also, I didn't even mention all the plugins that aren't loading because of Skript

#

and then ItemHover

#

incontrolu is freaking out

turbid tide
#

ye but seems like DChat breaks because of ChatControl

#

restart your server Rewinder

unreal glade
#

Just did

turbid tide
#

because that log still shows ChatControl loading

unreal glade
#

I removed plugman

mint fable
#

ok send new log when you can

unreal glade
#

Working on it now, my FTP is being slow

turbid tide
#

I'm so confused

#

do /pl and send an image

#

of all the plugins

#

you just sent a log from 16:33 but the log you sent before is from 16:44 and not only that ChatControl still shows as loading

unreal glade
#

Alright I'm gonna have to open the zip one second. It's not updating the latest log.

turbid tide
#

but

#

opening a zip is not rly going to help[

#

because we need the latest

#

after you just fully restarted your server

unreal glade
#

Hmmm, idk why the log isnt updating.

#

That's the pl.

turbid tide
#

ye so unless I get the newest log I don't have anythign I can tell you

#

does the chat still look like that?

#

when you type?

unreal glade
#

That's what it looks like,

turbid tide
#

ok so it works now?

#

what's not working anymore?

unreal glade
#

Prefixes

turbid tide
#

what are you using to show the prefix

unreal glade
#

I use LP

turbid tide
#

well yes

#

but what placeholder

unreal glade
#

Uhm

#

Let me check

#

prefix: '%deluxetags_tag%%vault_prefix%'

turbid tide
#

/papi parse me %vault_prefix% what does it return?

unreal glade
#

It kicked me saying PROXY lost connection to server

#

Yeah it just kicks me

turbid tide
#

when you do that command?

#

xD

unreal glade
#

Yep, I've done it four times xD

turbid tide
#

what the hell

#

any errors in console?

unreal glade
#

Everytime it kicks me saying [PROXY] Lost connection to server

turbid tide
#

but in console

unreal glade
#

For SURE latest log.

mint fable
#

bro

#

have you deleted ChatControl-Free-5.9.1.jar and ChatControl.jar or what

unreal glade
#

Yes

mint fable
#

because that is not the latest if you have 100% done that

#

just read the first 11 lines of the log you can see it's wrong

#

in the error you sent it says viaversion is throwing an error

#

you didn't try the dev build of deluxechat either?

unreal glade
turbid tide
#

he did according to the plugin lists

#

but the logs are broken

unreal glade
#

The damn plugin is gone

mint fable
#

how were you able to send us a snippet?

unreal glade
#

Idk why it's activating her.

#

Wdym?

mint fable
#

the log is the wrong log

#

that's all

#

but you sent us a snippet of the error

#

how

unreal glade
#

Idk

tender vaporBOT
#

@unreal glade,

mint fable
#

Caused by: java.lang.ClassNotFoundException: me.clip.deluxechat.compatibility.Spigot_1_12_R1_Chat

#

what 1.12.2 are you using...?

#

a custom jar?

#

wait you still haven't tried the 1.16.2 dev build

#

I have no guarantee it will work, but it's best to test

unreal glade
#

It's a custom jar

#

And send me the link to the dev build?

mint fable
#

custom jars can break plugins as well. not saying it will, but I also don't know what's been done to it

unreal glade
#

Alright

mint fable
#

but I believe all clip's plugins are built against/for spigot

#

even paper breaks some plugins (maybe not clip's, but others)

unreal glade
#

That's understandable.

safe vault
#

wait...
this

var returned;
var players = [];
var wrong = false;


function getPos(outPos) {
    var i;
    for (i = 1; players.length < outPos; i++) {
        var holder = "%" + "parkour_leaderboard_".concat(args[0], "_player_", i.toString()) + "%";
        var name = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, holder);
        if (!(players.includes(name))) {
            players.push(name);
        }        
    }    
    returned = players;//[players.length - 1];
}

does this

[Fri, 27. Nov 2020 20:29:25 CET ERROR] [PAPI] [Javascript-Expansion] An error occurred while executing the script 'leaderboard':
TypeError: players.includes is not a function in <eval> at line number 11

turbid tide
#

I think its include not includes

safe vault
#

typeof players; returns "object"

vivid sparrow
#

Pretty sure the js expansion runs ECMA 5

safe vault
#

what does that mean?

turbid tide
#

5.1

#

no access to newer methods

#

than what the Nashorn engine has.

safe vault
#

so what should i do??

turbid tide
#

ugh idk for sure. No idea which are available and which are not

safe vault
#

when i want to replace array.includes(); ?

turbid tide
#

I mean you could just loop thru the array

#

and check each value

#

I guess

safe vault
#

oh ok

turbid tide
#

so

#

you would have a boolean value

#

that's false by default

#

and if you find the value you're looking for in the array

#

make the boolean true

#

and then if the boolean is true you run this players.push(name);

#

loop using Array#forEach

safe vault
#

ok thx

dusky basin
#

hey all quick question.. is the latest release of papi working on 1.16.4?

turbid tide
#

the dev builds do

dusky basin
#

perfect. I couldn't find the link for dev builds. thank you

gentle summit
#

im using the javascript addon to make a placeholder for my towny server, but i cant figure out how to get it to work

#

im trying to get it to display a message if they are in a town, and a different message if they arent

turbid tide
#

You don't know how to create a new js placeholder? or you don't know what the actual code inside it should be?

gentle summit
#

i dont know what the code should be

#

i have the placeholder made already

turbid tide
#

is there a placeholder that returns true/false or something like that if you're in a town already?

gentle summit
#

yep

turbid tide
#

what's it?

gentle summit
#

%townyadvanced_has_town%

turbid tide
#

well that returns yes/no if you have a town right?

gentle summit
#

yep

turbid tide
#

and you want the js palceholder

#

to return something else?

gentle summit
#

yes

turbid tide
#

when they have a town and when they don't ?

#

k easyt

gentle summit
#

yes

turbid tide
#
"%townyadvanced_has_town%" == "yes" : "Message If Player Has Town" ? "Message If Player Doesn't Have Town"```
#

this is the entire code

#

its 1 line

gentle summit
#

...

turbid tide
#

make sure you're using latest version of JS expansion tho

gentle summit
#

it says : expected at the end

#

but when i add that it says expression expected

turbid tide
#

oh

#

wait my bad

#

"%townyadvanced_has_town%" == "yes" ? "Message If Player Has Town" : "Message If Player Doesn't Have Town"

#

here

#

messed up the ? and :

gentle summit
#

oh ok

#

thank you

#

ive never made a server before and ive only done a little bit of coding so this is pretty new to me

#

ill let you know if that works

#

somehow they got swapped

#

im in a town but its showing the message if they arent in a town

turbid tide
#

and if you're not in a town?

#

does it show the other one?

gentle summit
#

nope

#

still that one

turbid tide
#

oh

#

are you sure %townyadvanced_has_town% returns yes and no

#

when you think it does?

gentle summit
#

it returns true and false and i changed where you had yes to true

#

...

#

i had True instead of true

#

it works now

#

thank you

turbid tide
#

oh

#

no problem

gentle summit
#

is there a way to make it on separate lines

#

im trying to put it on the scoreboard

turbid tide
#

you'd probably need multiple placeholders or something

#

because I don't think \n will work

gentle summit
#

oh ok

turbid tide
#

but you can try

#

adding \n in the string

#

and se

gentle summit
#

i tried \n and it didnt

turbid tide
#

see*

#

oh

#

well I can edit the current one

#

to work with multiple lines

#

let me see

gentle summit
#

oh ok

turbid tide
#

how does it look rn?

#

your javascript

gentle summit
#

"%townyadvanced_has_town%" == "true" ? "Message If Player Has Town" : "&7Youre not in a town! But you can do /t new to start your own"

turbid tide
#

ok first of all

#

set both messages

#

and tell me where you want to split them

gentle summit
#

"%townyadvanced_has_town%" == "true" ? "&bTowny: &7%townyadvanced_town% <<SPLIT>> &bTown Bank: &7%townyadvanced_town_balance%" : "&7Youre not in a town! <<SPLIT>> But you can do /t new to start your own"

turbid tide
#

you will use it like this:

#

%javascript_NAME_1% and %javascript_NAME_2%

#

you put the one that has 1 in it in the first line

#

and the other one in the second line

gentle summit
#

its blank

#

the scoreboard

turbid tide
#

huh

gentle summit
#

nothing is there

turbid tide
#

what if you do /papi parse me %javascript% and of course you replace the placeholder with your actual javascript

gentle summit
#

thats blank too

#

oh wait

#

i think i know hwat i did wrong

#

nope

#

still blank

turbid tide
#

how are you using it?

#

can you show me the placeholder

#

that you parse?

gentle summit
#
var noText = ""
var yesText = ""

switch (line) {
  case "1":
    yesText = "&bTown: &7%townyadvanced_town%"
    noText = "&7Youre not in a town!"
  case "2":
    yesText = "&bTown Bank: &7%townyadvanced_town_balance%"
    noText = "&&But you can do /t new to start your own"
}

"%townyadvanced_has_town%".toLowerCase() == "true" ? yesText : noText```
#

its the thing you had in the link

turbid tide
#

no no

#

the actual placeholder

#

/papi parse me ...soemthinghere...

#

what goes instead of somethinghere

gentle summit
#

/papi parse me %javascript_NAME_1%

turbid tide
#

oh

#

not NAME

#

the actual name of your javascript

#

my bad

gentle summit
#

ik

#

i made it called name

turbid tide
#

what is the name?

#

oh lol xD

gentle summit
#

NAME_1.js

turbid tide
#

wait no

#

that's not going to work

#

you sohuld've left it like it was before

gentle summit
#

what

turbid tide
#

1 is an argument

#

not the name

gentle summit
#

oh

turbid tide
#

show me your javascript_placeholders.yml

gentle summit
#
  file: NAME_1.js

NAME_2:
  file: NAME_2.js```
turbid tide
#

ok that makes sense

#

you don't need all that

#

so

#
towny:
  file: towny.js```
#

instead of those 2 you sent put this one

#

then do /papi reload

#

then go to towny.js and put this code inside ```js
var line = args[0]
var noText = ""
var yesText = ""

switch (line) {
case "1":
yesText = "&bTown: &7%townyadvanced_town%"
noText = "&7Youre not in a town!"
case "2":
yesText = "&bTown Bank: &7%townyadvanced_town_balance%"
noText = "&&But you can do /t new to start your own"
}

"%townyadvanced_has_town%".toLowerCase() == "true" ? yesText : noText```

#

then use %javascript_towny_1% for line 1 and %javascript_towny_2% for the second line

#

@gentle summit

gentle summit
#

ok sorry im back

#

it repeats the message "but you can do /t new to start your own" on both lines

turbid tide
#

can you do /papi parse me %javascript_towny_1% and tell me what it says

#

then do /papi parse me %javascript_towny_2% and tell me what it says

gentle summit
#
towny_1:but you can do /t new to start your own
towny_2:but you can do /t new to start your own
turbid tide
#

oh man

#

this is interesting

gentle summit
#

sorry for using so much of your time

turbid tide
#

nah don't worry

#

what happens

#

if you make a town?

#

@gentle summit

gentle summit
#

it repeats the town balance message

#

also i changed the % to a { around the placeholders in the code

#

because they dont work with % and you have to do {}

turbid tide
#

what?

#

what are you talking about?

#

they do work

#

but still

#

that's not going to affect the result

gentle summit
#

ik it wont affect the result

#

but when they were %s it didnt work

#

and i remembered i saw somewhere they need to be { if they are a placeholder inside of the java placeholder

turbid tide
#

they don't

#

that's just in arguments

gentle summit
#

ohh

#

it still didnt work when i had %s

#

but when i changed them it shows the balance

turbid tide
#

can you show me the exact

#

js placeholder you have rn

#

with {}

#

and all that

gentle summit
#
var noText = ""
var yesText = ""

switch (line) {
  case "1":
    yesText = "&bTown: &7{townyadvanced_town}"
    noText = "&7Youre not in a town!"
  case "2":
    yesText = "&bTown Bank: &7{townyadvanced_town_balance}"
    noText = "&7Do /t new to make one"
}

"%townyadvanced_has_town%".toLowerCase() == "true" ? yesText : noText```
turbid tide
gentle summit
#

...

#

i guess not

#

because when i did that its showing the message saying to create a town

#

but im in a town

turbid tide
#

hmm

#
var line = args[0]
var noText = ""
var yesText = ""

if (line == "1") {
  "%townyadvanced_has_town%".toLowerCase() == "true" ? "&bTown: &7{townyadvanced_town}" : "&7Youre not in a town!"
}else {
  "%townyadvanced_has_town%".toLowerCase() == "true" ? "&bTown Bank: &7{townyadvanced_town_balance}" : "&7Do /t new to make one"
}```
#

can you try this code please? @gentle summit

gentle summit
#

works

#

thank you

turbid tide
#

oh finally. you're welcome xD

obtuse prawn
#

I have a question about adding my plugin to the papi wiki listings. I'm about to create a pull request, but the docs say I need to ask about doing that on this discord server first. Is there anything special that needs to be done prior to creating a pull request?

charred gyro
#

i have a quick question about featherboard (or really any scoreboard plugin) when someone has a sec.

what is the placeholder to show the rank WITH the rank color? right now I use the vault rank placeholder, but id like to know how i can display the rank with its color. also, my online player placeholder doesn't show up. its just blank.

ERROR [FeatherBoard] Error in placeholder: {playtime_hours}

turbid tide
turbid tide
charred gyro
#

Hmm, ok. I'll try again. Hold on.

turbid tide
#

make sure you have the Vault expansion installed for both ways tho

#

/papi ecloud download Vault and /papi reload

charred gyro
#

Yeah, I've done that.

turbid tide
#

well then those should work

charred gyro
#

Its just blank.

turbid tide
#

as long as you've set your rank prefix

#

are you sure you've set your rank prefix correctly ?

charred gyro
#

I've set it in TAB and PrefixSystem (are the plugins I use for the prefixes) and I use pex. I have vault installed but don't know where I would set prefixes there.

turbid tide
#

ugh I never used PEX

#

let me check if there's a wiki or something

charred gyro
#

K

turbid tide
#

can you send link to the plugin? xD

charred gyro
#

Well, I've been using pex since 2017, so i just know it best. Even though its outdated.

#

which one?

turbid tide
#

pex

#

bcz the first search results

#

are some random plugins that also include pex in their name lol

carmine veldt
#

try search permissionsex

charred gyro
#

lol you cant even download it

turbid tide
#

oh

#

I see

#

its not on spigot

#

btw aidan you should look into LuckPerms

#

has an import feature as well to import pex configs

obtuse prawn
#

BlitzZzZzZzZ: Thanks for the reply. I already opened a pull request. But the documentation that it tells you to read prior to creating a pr says you must first contact the repository owners to discuss the pr prior to creating one. I guess it was just a copy and paste statement. lol... Thanks again for the response. 🙂

charred gyro
#

Hmm, ok.

turbid tide
#

lol they just link to LP as well on their page

#

no wiki or anything

charred gyro
#

would that really be the issue tho? where can i set prefixes in vault?

turbid tide
#

you can't in vault

#

you need to set it in your permission plugin

charred gyro
#

so where does vault get the prefix from?

#

oh shit

#

i dont have prefixes set in pex lol

#

hold on ima try that

turbid tide
#

oh you know how to set them? xD I was searching for how to set tthem

#

/pex group <group> prefix [newprefix]

#

that's how you set it

charred gyro
#

trying rn

#

ahh there we go xD

#

now its showing up

#

and what about the playtime? my console is being spammed by this
ERROR [FeatherBoard] Error in placeholder: {playtime_hours}

turbid tide
#

well there is the statistic expansion

#

instead

#

so /papi ecloud download Statistic and /papi reload

#

then use {placeholderapi_statistic_time_played}

charred gyro
#

youre the man! thanks.
is there a way I can change/shoten the layout of the time?

#

i dont need the seconds, and would like it to be displayed in only hours, if thats possible

turbid tide
#

yes

#

statistic_hours_played

#

instead of statistic_time_played

charred gyro
#

thanks so much.

primal dune
#

How could I combine the player count of multiple servers into one number?

turbid tide
#

-paoi bungee

primal dune
#

I am well aware, but I am looking to count specific servers, not all of them.

turbid tide
#

Oh math + bungee then

primal dune
#

Is there a section about math?

#

or do normal symbols just work

turbid tide
#

%math_[precision:0]{bungee_bedwars}+{bungee_skywars}+{bungee_hub}%

#

Example

primal dune
#

Appreciate it 🙂

#

One more question though. Is there an if function, to set the text to something else if the server is full for example

turbid tide
#

Javascript expansion if you want more customizability

#

Hmm let me see if I can find the links

#

On phone rn

primal dune
#

Thanks again

rare lily
#

Once again, how am I gonna edit the wiki on JS expansion though?

turbid tide
#

Define "isn't working"

pure plover
#

Hey, my countdown timer is showing as 1d 32h, my plugin is up to date, is there a way to fix this?

#

This is what I'm using as well:

#

%server_countdown_dd.MM.yyyy_30.11.2020%

pure plover
#

Thank you, I'll give that a try 🙂

mental night
frail otter
#

the placeholder %luckperms_prefix% doesnt work :/

#

it just doesnt work?

#

nvm

minor spade
#

everytime i try to /papi reload i get this error and im unable to reload my placeholders

austere hawk
#

@humble nymph hi

upper nest
#

How would I display the persons information that I'm running a command on?

#

For example, I'm using Statistics so there is this placeholder: %statistic_days_played% . It displays my playtime on the GUI when I want it to display the information of the player I'm running the command on. Anyway to make that happen?

plain quarry
#

Hi, I'm trying to use %server_countdown% to count down to midnight - using format HH.mm - just shows up as zero. Anyone know why?

upper nest
#

Update to dev build

upper nest
#

Yup

warm topaz
#

use args

upper nest
#

Can I get a example?

warm topaz
#

all ik is that its possible 🙂

upper nest
#

Thanks, I'll take a look

#

Oh args like {player}

#

Yes I know that

#

But I'm talking about placeholders

#

As far as I can tell args don't work with them

plain quarry
upper nest
#

):

stone parcel
#

is there a placeholder that parses a placeholder for an other player?

#

found it

smoky spoke
#

i tried using the %player_item_in_hand_level_Sharpness% placeholder and it brings up an error

silver minnow
smoky spoke
#

it did

tender vaporBOT
smoky spoke
#

ow it uses a different naming ok

rare lily
pulsar locust
vivid sparrow
#

try to open the papi plugin.yml and add EssentialsX as soft depend

tender vaporBOT
#

@pulsar locust,

vivid sparrow
#

np

gloomy crater
#

does anyone have any experience with the ScoreboardObjective placeholder? I am currently trying to parse the displayname of the objective, but it keeps returning ObjDNE

mild gale
#

how do I make top kills in holographic display?

gloomy crater
#

LeaderHeads support a leaderboard for HD

#

its a premium plugin tho, and it could be pretty performance-heavy sometimes

elder stump
#

Hey! How can I remove comma using javascript from %jobsr_user_jmaxexp_(jname/number)%?

turbid tide
#
args[0].replace(",", "")```
elder stump
#

thanks

turbid tide
#

if you need help setting up the js placeholder there's a wiki as well

#

but yeah the code should just be one line

pulsar notch
#

Hello, it seems that PAPI for LeaderHeads isn't working. (PS: I'm not sure about what im saying, maybe i'm just noob.

https://i.imgur.com/5DWz0c6.png
Is there anyway to resolve it?

vivid sparrow
#

idk what that is supposed to be

#

but is not correct, leaderheads have other placeholders

turbid tide
#

yes those placeholders are wrong

#

lol

stone edge
#

lol

steep thorn
upbeat yew
#

Someone know how to transfer placeholders across bungee/servers? I have minigames server and some minigames does not support MySQL and I want to show player stats in Profile menu on Lobby server and I didn't found any plugin that can transfer Placeholders across servers, if someone knows, help me please 🙌 ...

turbid tide
upbeat yew
#

Thank you for respond but I didn't found any plugin 😦

steep thorn
#

This is actually something that I'm trying to integrate into LeaderHeads

#

To make it more easy to see your own stats (as well as daily/weekly/monthly stats)

#

Cross-server as well

turbid tide
#

There was one plugin on songoda

#

and an API

#

on spigot

#

if you know how to code

steep thorn
#

@turbid tide does that depend on whether the expansion on the other server (in your Bungee network) supports retrieval of data for offline players?

turbid tide
#

IDK for sure. I'll try and search the api and post link here.

mild gale
#

how do I make top kills in holographic display??

turbid tide
#

you got a top kills placeholder first?

#

Like DeluxeCombat or LeaderHeads or whatever

#

then its pretty easy

#

just install HolographicExtension, ProtcolLib and you're good to go

#

if not

#

then you need to have a leaderboard plugin first

#

or you can check this

#

idk if it has kill tops

#

oh nvm xD

#

that's just palytime

serene raven
#

not sure if this is the right place to ask but, i wanted to know if it is possible to show what player a server is currently on with a placeholder. this would be meant for bungeecord. i don't know much about making plugins or anything lol

turbid tide
#

well if you want to show that info in the same server then its possible yes

#

%server_name%

serene raven
#

Oh alright, so it wouldn't be possible to show it over a network? I wanted to make my friends menu show what server their friend is connected to but it doesn't seem like it would work

turbid tide
#

well not using PAPI alone no.

#

it does require some plugin development knowledge tho I'm pretty sure

turbid tide
#

huh?

mild gale
turbid tide
#

ugh what're you using?

mild gale
#

/hd setline topkills 2 &e&l1. &d&l%player_name% &8&l- &c&l%deluxecombat_ranking_KILLS_1% This is the placeholder I used

turbid tide
#

DeluxeCombat?

#

oh

#

well because there's no one to take the spot

#

DeluxeCombat takes the stats from what it has saved itself. So if you just added it it has no stats to fetch

mild gale
#

oh got it

#

thanks

turbid tide
#

Also did you just purchase DCombat for the Leaderboard part? xD

mild gale
#

yes

turbid tide
#

smh

#

make sure you look thru the entire plugin and configure it

#

it has a lot of great feature but some are enabled by default and you might just not want them on your server

mild gale
tender vaporBOT
#

@mild gale,

turbid tide
#

%statistic_time_played%

mild gale
#

got it thanks! ❤️

odd jay
#

I'm getting this error on all my javascript placeholders since I updated my papi:
[Server] WARN [PAPI] [Javascript-Expansion] ScriptEngine type for javascript placeholder Cooldown isn't initialized! Defaulting to global
How could I fix it?

tender vaporBOT
#

@mossy helm,

turbid tide
#

Oh my bad lol. I use val instead of var

#

Here

odd jay
turbid tide
#

Yes Ravensky

#

@rare lily please make it off by default and add a debug option in config.yml or something

#

This is like the 10th persons in the past week

odd jay
#

It works fine now

#

but some of my javascript placeholders aren't showing any values when parsing them. This happened when I updated from 2.10.6 to the last version.
A placeholder example that isn't showing any values now is this one:

var placeholder2 = "%luckperms_check_permission_CustomEnderChest.level.5%";
var placeholder = "%luckperms_check_permission_mejoras.enderchest%";

function permission() {
   if (placeholder == "&aSí" && placeholder2 == "&cNo")
     return "&fDisponible";
   if (placeholder == "&cNo" && placeholder2 == "&cNo")
     return "&cEn mantenimiento...";
   if (placeholder2 == "&aSí") 
     return "&2¡&aMejorado al máximo&2!";
}
permission();
#

Does anyone have any idea of why isn't this working?

tender vaporBOT
#

@mossy helm,

odd jay
#

now you need to put "§" instead of "&"

turbid tide
#

why lol? xD

#

we can fix that. xD

#

hmm

#

so by the looks of it .split is not a function? hmm that's weird.

#

ohhh

#

had to convert it to a string first

turbid tide
wise scaffold
#

heyo

#

is there a placeholder which returns all the online players?

turbid tide
#

^

junior musk
turbid tide
#

k lol xD

wise scaffold
#

Thank you for the expansion

junior musk
# turbid tide k lol xD

well if you try to understand the placeholder with only what you see here, you can't really understand anything 😅

wise scaffold
#

I had the papi wiki open :p

#

There's no way to somehow make it so people who can been seen by certain groups get returned, right?

#

(for vanish)

#

%playerlist_online,cansee,no,list% is apparently a thing but doesn't return anything

turbid tide
#

@junior musk help this guy out smh. xD

wise scaffold
#

:pepehands:

junior musk
#

I don't know

#

it depends if your vanish plugin shows players to you or not I guess

wise scaffold
#

PremiumVanish

#

I just want a list if players which can be viewed by a default user

#

yepp I did

#

But then it shows everyone except me (me, who is in vanish)

junior musk
#

online,normal,yes,list

#

I'm lost with this thing myself x)

wise scaffold
#

%playerlist_online,normal,yes,list%

#

I parsed it as another players who can't see me in vanish and it shows my username

junior musk
#

ah

#

yeah then I don't think it's possible atm

wise scaffold
#

:pepehands:

junior musk
#

I'll see if I can change the cansee thing to support PV

wise scaffold
#

Please @ me / dm if that becomes a thing

junior musk
#

I don't think I'll be able today but I'll see this week

#

too many homeworks NotLikeThis

wise scaffold
#

I have a temp solution for it, best of luck with them homeworks!

torpid plume
#

Do I have to put placeholderAPI on the bungee with the bungee placeholders

turbid tide
#

no

#

just put it on each server

#

and also download the Bungee expansion

#

on each

torpid plume
#

Is there a placeholder where I can find out how much money I have with vault and if so what is its name and which eCloud do I have to install and where can I set where the placeholders should update themselves?

turbid tide
#

@torpid plume ^

torpid plume
#

Thank you!

#

And you can still set where the placeholders should update themselves because, for example, in my sidebar it is not so nice if you have to rejoin so that it is updated

turbid tide
#

well the placeholder itself updates. The sidebar needs to update as well

#

because if you do /papi parse me %placeholder% then give yourself some money and do the same command you'll see its updated

atomic trench
#

Hey guys

#

Is someone here good at math?

turbid tide
#

no xD

odd jay
atomic trench
turbid tide
#

just ask away. oh you're writing a bible xD

atomic trench
#

I'm trying use %math_<math expression>% to divide %mcmmo_power_level% by 5 and return the lower multiple of 5 for example, If player's power is 109, it must return 20, and if 110, must return 21

#

I just can't think of a formula for that

steep thorn
#

@atomic trench do you mean floor division?

turbid tide
#

probably need a js expansion instead

steep thorn
#

Nah

#

This has floor()

atomic trench
atomic trench
steep thorn
#

%math_floor({mcmmo_power_level}/5)%

#

Not sure if that would work, never used it myself

turbid tide
#

wait

mint fable
#

use {} for mcmmo placeholder

turbid tide
#

but %math_[precision:0]{mcmmo_power_level}/5%

#

won't this just work/

mint fable
#

yes

#

no need to floor

turbid tide
#

@atomic trench

atomic trench
#

O wait precision is a thing

mint fable
#

i mean, either work

atomic trench
mint fable
#

floor or precision

steep thorn
#

Yeah that could also work

#

floor gang 😦

mint fable
#

floor gang

turbid tide
#

xD

atomic trench
turbid tide
#

I mean at that point does it rly matter?

steep thorn
#

It wouldn't make any difference most very likely

mint fable
atomic trench
#

Yeah you're right, I don't think some placeholder will be harder to process than most villager farms that are on my server

#

1500 villagers loaded at the same time it's just not fun

turbid tide
#

I mean a math division is the latest thing you'll have to think about when you make a minecraft server.

atomic trench
vast sleet
#

Hey guys

#

using the API, I'm trying to set relational placeholders regarding faction

#

Let's imagine the situation

#

Two player, A & B

#

A is enemy for B, but B is neutral for A

#

then, when using PlaceholderAPI.setRelationalPlaceholders, who is Player one and Player two when sending the message to player one

#
public static String setRelationalPlaceholders(org.bukkit.entity.Player one,
                                               org.bukkit.entity.Player two,
                                               @Nullable String text)```
#

I need to figure out who is target and who is source between the two args

slow crystal
#

lol

#

probably

austere hawk
vast sleet
#

it's about PAPI API

#

tho

slow crystal
#

PAPI API?

#

lol

vast sleet
#

xd

#

you know what I mean

austere hawk
#

PAPI API API

vast sleet
#

🐔

austere hawk
#

🧑‍🦯

slow crystal
#

so what is the issue here?

vast sleet
#

i'm trying to send custom JSON message

#

with hover effect things

#

and i'm using the rel placeholder to show color (red for enemy etc)

#

when using the method

#

idk who is "one" and "two"

#

like

#

it's not

#

explicit

slow crystal
#

oh

#

I mean logically one is the source

#

but maybe just try both?

#

idk i've not actually used papi much lol

vague dove
#

is there a specific reason why registration is turned off for ecloud

turbid tide
#

it's been like that forever I think. Might be wrong. Contact @funnycube#0001 he'll help you make an account

vague dove
#

thonks interesting thanks

marble sandal
#

Hello, can you help me, how add statistic enchanted golden apple? (%statistic_use_item:<Item Material>%) because ENCHANTED_GOLDEN_APPLE dont work...

turbid tide
#

what's your server version?

dense nebula
#

Hey there
i have a problem with hex color codes not showing up from luckperms in the Anmated tablist plugin
is this a papi problem?

marble sandal
tender vaporBOT
#

@marble sandal,

turbid tide
#

oh

#

try %statistic_use_item:golden_apple:1%

#

maybe

smoky spoke
#

%checkitem_remove_amt:1% placeholder is taking twice the amount if twice of the required item is available

#

so like, if i have one required item, it will work. if i have another copy of the required item, it will take the copy.

#

issue conducted from Command Panels

stone parcel
#

how do i have to use the ceil function with the math placeholder?

#

i tried %math_ceiling({vault_eco_balance}/10)*10]%

vivid sparrow
#

From what I see on github there is no ceiling method

steep thorn
#

It's part of EvalEX, which is supported according to the documentation

vivid sparrow
#

why is there a square bracket at the end btw

#

shouldnt be a parenthesis?

steep thorn
#

Yeah that was the problem

minor spade
#

many of my placeholders are broken and i cant reload my papi. it just gives me this error

https://pastebin.com/EyzLbVvg

am i missing an update or something im completely lost

vivid sparrow
#

I swear I made the config expansion code public

#

=PATE

#

=paste

tender vaporBOT
vivid sparrow
#

Put the papi config in there

minor spade
vivid sparrow
#

You are missing the "config" section, hmm

#

Have you used the expansion before?

minor spade
#

iv pretty much just put it in my server and done eclod things in game

warm topaz
#

u did gaby

#

its in papi repo

vivid sparrow
#

Its not, unless it has a different name

warm topaz
#

someone forked it

#

and ive saw it for myself before xd

minor spade
#

so i have something i need to add to my config myself?

vivid sparrow
#

Last commit 2018 @warm topaz

warm topaz
#

🥲

vivid sparrow
#

I did update it this year lol

warm topaz
#

ah

minor spade
#

ok well where do i get this update to fix my issue?

vivid sparrow
#

do you see where javascript, vault are?

#

Like the level?

#

Add this and reload papi again:

config:
  configs:
    example: example.yml```
minor spade
#

im not sure exactly where you mean? im really dumb sorry

#

its in my placeholder config?

vivid sparrow
minor spade
#

its just showing up as a white screen for me

vivid sparrow
#

remove the slash at the end

minor spade
#

ok that did it. so you want me to replace all my config with this then run /papi reload in game right?

vivid sparrow
#

yes

minor spade
#

that did it!

#

thank you so much!

vivid sparrow
#

great, np

austere hawk
#

ok so bascailly i need help on getting placeholderapi to show my 'playercount' on bungeecord servers

wet basinBOT
#

@turbid tide Unknown expansion.

turbid tide
#

use this expansion ^

austere hawk
#

ive done that

turbid tide
#

you need to have PlaceholderAPI on all servers (not proxy) and same for the Bungee expansion

austere hawk
#

k 1 sec

#

done that

#

wait so not the proxy

#

so not the bungeecord instance

turbid tide
#

yep

austere hawk
#

k

turbid tide
#

PAPI doesn't work on the proxt

#

proxy

austere hawk
#

k

#

ok yea ive done that

turbid tide
#

and it still doesn't work?

austere hawk
#

nope

turbid tide
#

what does it show?

#

when you parse the placeholder

austere hawk
#

wdum parse?

turbid tide
#

/papi parse me %placeholder% but of course change the %placeholder% part to the placeholder you want to use for example %bungee_total%

austere hawk
#

ok but what if its an MVdW placeholder?

#

im tring to get it on featherbaord

#

and that uses MVdW

turbid tide
#

{placeholderapi_bungee_total} for example

#

so remove %% and add {placeholderapi }

austere hawk
#

k leme add that

#

oh lmao

#

works now

#

sos for being a dumbass

#

ty guys

turbid tide
#

xD nah no worries

lone coral
#

Hey I'm having some weird issue that started out of nowhere on my bedwars1058 server. The vault placeholders aren't working with bw1058 in the language.yml

#

I'm running luckperms on a bungee network and everything looks properly connected

turbid tide
#

only the vault placeholders?

#

no other placeholder?

lone coral
#

only the vault placeholder

#

{vPrefix}

turbid tide
#

oh

#

wait that's not PAPI

lone coral
#

it's vault then?

austere hawk
#

whats the error msg in console?

turbid tide
#

well %vault_prefix% is the PAPI placeholder

#

not {vPrefix}

lone coral
#

should I go to vault for this issue then?

turbid tide
#

hmm idk actually

#

does BW1058 support PAPI?