#placeholder-api

150650 messages · Page 90 of 151

cunning charm
#

You can see the server time on right side of screen

turbid tide
#

can you do /papi parse me %server_countdown_HH:mm_23:00% %server_time_HH:mm% please

#

and send a screenshot of that output

cunning charm
turbid tide
#

hmm. that's a strange one. wonder if it actually really needs the date. in which case you can try something like this`

#

%server_countdown_dd/MM/yyyy HH:mm:ss_{server_time_dd/MM/yyyy} 23:00%

cunning charm
#

"invalid date"

#

Even this

opaque geyser
turbid tide
cunning charm
turbid tide
cunning charm
#

Oh wait

turbid tide
cunning charm
#

It does need a date

turbid tide
#

hmm?

cunning charm
#

%server_countdown_dd/MM/yyyy HH:mm:ss_{server_time_dd/MM/yyyy} 23:00%

#

HH:mm:ss

#

23:00

turbid tide
#

omg

#

%server_countdown_dd/MM/yyyy HH:mm:ss_{server_time_dd/MM/yyyy} 23:00:00% xD

cunning charm
#

Yeah lol

#

Thank you

turbid tide
cunning charm
turbid tide
#

You'll probably want to make a custom javascript for this instead.

cunning charm
#

Blegh, not that bothered. No worries, thanks

turbid tide
#

in theory not that hard. but I can't be bothered either xD

#

you're welcome

cunning charm
#

@me when placeholder in a placeholder in a placeholder is a thing

turbid tide
#

don't even think PAPI3 will add that and that will only be launched next year

#

or so

#

but anyways

#

turns out I can be bothered lmao

cunning charm
#

Any reason update_interval: 5 seems to not work?

turbid tide
#

that you want to update

#

they don't automatically update.

cunning charm
#

Got it

vivid sparrow
#

ver sound = Java.type("org.bukkit.Sound.BLOCK_NOTE_BLOCK_BIT");
Try this @bold mesa

#

And that for loop isnt not valid, is it?

#

for (var i = 0; i < onlinePlayers.length; i++)
var player = onlinePlayers[i]

#

Hmm, try var sound = Java.type("org.bukkit.Sound").BLOCK_NOTE_BLOCK_BIT; and define it above the loop

#

and if that doesn't work, try this instead var sound = Java.type("org.bukkit.Sound").valueOf("BLOCK_NOTE_BLOCK_BIT");

#

remove that player definition at the top

#

and that's the only way to play the sound to everyone, loop trough all players and call Player#playerSound

keen spear
#

im trying to create a health bar with progress placeholders

/papi parse me %progress_bar_{player_health_rounded}_c:&a■_p:&e■_r:&7■_l:5_m:100%

it used to work fine a few hours ago, but suddenly it will only parse "completed" rather than the bar itself

cloud mortar
#

Hey what placeholder should I use so it shows if my server is online or offline

vivid sparrow
#

%pinger_isonline_<server/ip>:<port>%

wheat cape
#

I can't seem to find PlaceholderAPI_ver_DEV.jar anymore, is it now RC as shown in pins here?

cloud salmon
vivid sparrow
#

Can you use /papi parse? @cloud salmon

cloud salmon
#

Well

vivid sparrow
#

Hm?

cloud salmon
#

cuz it works fine

#

it only doesn't work when a player disconnects

#

i'm guessing cuz i use the prefix in nametags as well as scoreboard

#

so i have to somehow find offline player

#

idk how to do that with javascript tho tbh

vivid sparrow
#

hmm, if they leave, the placeholder shouldnt be parsed at all I guess

cloud salmon
#

not sure

#

but i get that error everytime someone leaves

#

only sometimes, not everytime

plush ivy
#

after updated to new papi my chat placeholders brokes
colors code are showing :/

keen spear
#

how do I disable the fullbar option in papi progress?

gleaming saffron
#

How can I use this placeholder "%sound_ all_ <sound>-<volume>-<pitch>%"?
I already download "/papi ecloud download Sound" and reload my server. How can I use or check this placeholder with command /papi parse ? What is the format of this placeholder? What the format have sound in this placeholder?

warm plover
#

So I have downloaded the "Data" community script along with a data example script and it doesn't seem to let me check data with %javascript_data_get,{player_name}.viewed%

#

%javascript_essentials_menu_glass% This however shows the number correctly

#

function viewCount() {
    var views = Data.exists(dataLoc) ? Data.get(dataLoc) : 0;

    views++;

    Data.set(dataLoc, views);
    Placeholder.saveData();

    return views;
}

viewCount();```
This is the file
mint fable
#

each script has it's own data

#

sounds like you're trying to use the data cross-script @warm plover

warm plover
#

I just want to set a variable in game for it to be used in game

mint fable
#

Yes so it all has to be done inside one script

warm plover
#

I see

mint fable
#

if you use the data community script then you have to use javascript_data_get,... javascript_data_set,...

warm plover
#

And my script for the variable has to be in data.js too?

mint fable
warm plover
#

this is in a different file

mint fable
#

I don't understand the purpose of writing a script, I thought you just wanted a varaible

#

you test it with get and set

warm plover
#

/papi parse me %javascript_data_get,{player_name}.viewed% shows nothing

mint fable
#

probably because it wasn't set yet

#

did you ever set it?

warm plover
#

I thought I did, let me try again in case

mint fable
#

/papi parse me %javascript_data_set,{player_name}.viewed,0%

warm plover
#

Ah okay setting it did make it show up

#

So I don't even need a script for variables, data.js literally just does this for me

#

That's what it seems like anyway

mint fable
#

correct

#

the Community Script Data just makes javascript data easier to use

#

and a bit more user friendly

warm plover
#

Thank you very much

#

This is perfect!

warm plover
#

Is there a way I can set a data placeholder to the default empty string?
Like this, but this doesn't do it /papi parse me %javascript_data_set,glassColor,%

mint fable
#
function set(path, data) {
    if(data === "")
        Data.remove(path);
    else
        Data.set(path, data);
    return "";
}
``` maybe
#

could've just added a remove

#

but

#

that felt easier

barren token
mint fable
#

ah, don't really have time to add remove to that script rn

warm plover
#

Alright no worries

barren token
warm plover
#

Is there a way to assign a default value to a JS data?

stone edge
#

what you mean with "js data"

vivid sparrow
#

var something = Data.get("key") || "default"; try this

turbid tide
#

I believe he's referring to the javascript expansion which has a data feature. And the answer is yes. By changing the code itself.

warm plover
#

Ah apologies, I mean this the data community script

vivid sparrow
#
function get(path, def)  {
    return Data.exists(path) ? Data.get(path) : def;
}```
turbid tide
#

and you could even make the default value just be an argument as well. Similar to how deluxemenu's meta works

warm plover
vivid sparrow
#

if data exists ? return Data.get() : otherwise, return def

#

is a shorter if-else statement

warm plover
#

Oh I see, and def is the default value?

turbid tide
#

its called an elvis operator or a ternary operator.

turbid tide
vivid sparrow
#

elvis is different

turbid tide
#

you can set it to any string

turbid tide
warm plover
#

So would I change def to "String"

vivid sparrow
#

yes, it only works for null values

#

null ?: "def"

turbid tide
#

I see

vivid sparrow
#

yes

warm plover
#
    return Data.exists(backgroundGlass) ? Data.get(backgroundGlass) : "GRAY_STAINED_GLASS_PANE";
}```
#

Would this be correct?

turbid tide
#

yeah. but you don't need the def parameter then

#

but careful

#

this will set the default value to GRAY_STAINED_GLASS_PANE For all your data placeholders

warm plover
turbid tide
#

oh.

#

no.

warm plover
#

Hmm, guess that's not a huge deal really

#

But for anyone who downloads this (which I was planning on making it public) it could be

tender vaporBOT
cloud salmon
#

oop sorry

turbid tide
#

I recommend you use OfflinePlayer instead of BukkitPlayer

cloud salmon
#

what if they're not offline then?

#

is there a way to check with javascript if a player is null or not online?

#

i dont know exactly tbh

plush fiber
#

Where should the variable expansion problem go?

stone edge
#

Elaborate a bit more

bitter timber
#

when updating papi, do I need to replace both the Jar file and the papi folder???

stone edge
#

afaik only the .jar file

errant iron
#

Only the jar file, yes

bitter timber
#

thought so, thanks

gleaming saffron
#

How can I use this placeholder "%sound_all <sound>-<volume>-<pitch>%"?
I already download "/papi ecloud download Sound" and reload my server. How can I use or check this placeholder with command /papi parse ? What is the format of this placeholder? What the format have sound in this placeholder?

empty beacon
vivid sparrow
#

Ask your plugin developer for an update

#

The relied on a part of the code that got removed, they should handle the coloring on their own

rustic carbon
#

is it just me or

#
[15:32:51 ERROR]: [PlaceholderAPI] Failed to load class files of expansion.
java.util.concurrent.CompletionException: java.lang.NullPointerException: Cannot invoke "java.lang.Class.getClassLoader()" because "result" is null
        at me.clip.placeholderapi.expansion.manager.LocalExpansionManager.lambda$findExpansionInFile$7(LocalExpansionManager.java:428) ~[PlaceholderAPI-2.11.2.jar:?]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
        at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760) ~[?:?]
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?]
        at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?]
        at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?]
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?]
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.Class.getClassLoader()" because "result" is null
        at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:113) ~[purpur-api-1.19-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.JavaPluginLoader.getClassByName(JavaPluginLoader.java:235) ~[purpur-api-1.19-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:128) ~[purpur-api-1.19-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:105) ~[purpur-api-1.19-R0.1-SNAPSHOT.jar:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:574) ~[?:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
        at me.clip.placeholderapi.util.FileUtil.findClass(FileUtil.java:62) ~[PlaceholderAPI-2.11.2.jar:?]
        at me.clip.placeholderapi.expansion.manager.LocalExpansionManager.lambda$findExpansionInFile$7(LocalExpansionManager.java:405) ~[PlaceholderAPI-2.11.2.jar:?]
        ... 7 more
#

everytime i restart my server

#

the papi ecloud download just goes poof

wanton burrow
#
java.util.concurrent.CompletionException: java.lang.NoClassDefFoundError: net/ess3/api/IEssentials
        at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[?:?]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.NoClassDefFoundError: net/ess3/api/IEssentials
        at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:?]
        at java.lang.Class.privateGetDeclaredMethods(Class.java:3402) ~[?:?]
        at java.lang.Class.getDeclaredMethods(Class.java:2504) ~[?:?]
        at me.clip.placeholderapi.expansion.manager.LocalExpansionManager.lambda$findExpansionInFile$7(LocalExpansionManager.java:413) ~[PlaceholderAPI-2.11.2.jar:?]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
        ... 1 more
Caused by: java.lang.ClassNotFoundException: net.ess3.api.IEssentials
        at java.net.URLClassLoader.findClass(URLClassLoader.java:445) ~[?:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:587) ~[?:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
        at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:?]
        at java.lang.Class.privateGetDeclaredMethods(Class.java:3402) ~[?:?]
        at java.lang.Class.getDeclaredMethods(Class.java:2504) ~[?:?]
        at me.clip.placeholderapi.expansion.manager.LocalExpansionManager.lambda$findExpansionInFile$7(LocalExpansionManager.java:413) ~[PlaceholderAPI-2.11.2.jar:?]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
        ... 1 more```
#

Actually I have something similar, every time I reload PAPI, this happens.

flat echo
#

Mine stopped working completely. Worked after I downgraded back to 2.11.1

wanton burrow
#

Could it be an issue regarding compatibility with other plugins?

balmy marten
balmy marten
wanton burrow
#

I will try updating Essentials, because the expansion was recently downloaded.

balmy marten
#

Awesome

balmy marten
flat echo
#

05.07 12:01:54 [Server] INFO Placeholder expansion registration initializing...
05.07 12:01:54 [Server] INFO Fetching available expansion information...
05.07 12:01:58 [Server] ERROR Failed to load class files of expansion.
05.07 12:01:58 [Server] INFO java.util.concurrent.CompletionException: java.lang.NoClassDefFoundError: net/ess3/api/IEssentials
05.07 12:01:58 [Server] INFO at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[?:?]
05.07 12:01:58 [Server] INFO at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[?:?]
05.07 12:01:58 [Server] INFO at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770) ~[?:?]
05.07 12:01:58 [Server] INFO at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760) ~[?:?]
05.07 12:01:58 [Server] INFO at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?]
05.07 12:01:58 [Server] INFO at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?]
05.07 12:01:58 [Server] INFO at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?]
05.07 12:01:58 [Server] INFO at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?]
05.07 12:01:58 [Server] INFO at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?]
05.07 12:01:58 [Server] INFO Caused by: java.lang.NoClassDefFoundError: net/ess3/api/IEssentials
05.07 12:01:58 [Server] INFO at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:?]
05.07 12:01:58 [Server] INFO at java.lang.Class.privateGetDeclaredMethods(Class.java:3402) ~[?:?]
05.07 12:01:58 [Server] INFO at java.lang.Class.getDeclaredMethods(Class.java:2504) ~[?:?]
05.07 12:01:58 [Server] INFO at me.clip.placeholderapi.expansion.manager.LocalExpansionManager.lambda$findExpansionInFile$7(LocalExpansionManager.java:413) ~[PlaceholderAPI-2.11.2.jar:?]
05.07 12:01:58 [Server] INFO at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
05.07 12:01:58 [Server] INFO ... 6 more
05.07 12:01:58 [Server] INFO Caused by: java.lang.ClassNotFoundException: net.ess3.api.IEssentials
05.07 12:01:58 [Server] INFO at java.net.URLClassLoader.findClass(URLClassLoader.java:445) ~[?:?]
05.07 12:01:58 [Server] INFO at java.lang.ClassLoader.loadClass(ClassLoader.java:587) ~[?:?]
05.07 12:01:58 [Server] INFO at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
05.07 12:01:58 [Server] INFO at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:?]
05.07 12:01:58 [Server] INFO at java.lang.Class.privateGetDeclaredMethods(Class.java:3402) ~[?:?]
05.07 12:01:58 [Server] INFO at java.lang.Class.getDeclaredMethods(Class.java:2504) ~[?:?]
05.07 12:01:58 [Server] INFO at me.clip.placeholderapi.expansion.manager.LocalExpansionManager.lambda$findExpansionInFile$7(LocalExpansionManager.java:413) ~[PlaceholderAPI-2.11.2.jar:?]
05.07 12:01:58 [Server] INFO at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
05.07 12:01:58 [Server] INFO ... 6 more

wanton burrow
balmy marten
flat echo
#

Don't even have essentials installed tbh

balmy marten
#

ah then remove the essentials expansion

#

delete it from /plugins/placeholderapi/expansions/

turbid tide
balmy marten
#

think the class is different

#

idk

turbid tide
#

hmm. no its not.

wanton burrow
#

When I use a Scoreboard, the PAPI placeholder extension for LuckPerms does not detect color codes being used on the ranks. This is not a problem from the Scoreboard plugin itself, since there are other color codes put in other places that work perfectly.

#

LuckPerms is updated, the expansion is updated. In the other subserver it works as intented. I dunno what's happening. .-.

turbid tide
#

so if your rank prefix is &cRed for example it will be returned as exactly that.

#

actually that might only happen for hex colors.

wanton burrow
wanton burrow
wanton burrow
#

Because if I enter /papi parse EverCR %luckperms_prefix% on both sub servers, one does retrieve the right color values, but in the other just returns the codes... And both servers have the same version of PAPI and LuckPerms .-.

wanton burrow
#

Nvm, I just saw what was the problem. Recent update 2.11.2 has the color coding format removed. So I just downgraded to 2.11.1 and it works as intented.

turbid tide
#

they intentionally don't parse it themselves. To let other plugins where placeholders are used parse it. Like scoreboards.

wanton burrow
#

Regardless, it works now. So I don't have complains.

edgy sapphire
#

Hey, is there any placeholder to display how many blocks all the members in the server have mined?

midnight egret
#

%statistic_player_kills% & %statistic_deaths% doesnt work

mint fable
#

/papi parse me %statistic_player_kills% says unknown statistic as well?

#

@midnight egret

civic ridge
#

Please help me Which placeholder shows Worlds?

trim solar
#

%math_0_{bungee_BwHUB-1}+{bungee_BwHUB-2}+{bungee_Bw1v1-1}+{bungee_Bw1v1-2}+{bungee_Armed-1}+{bungee_Armed-2}+{bungee_BwDoubles-1}+{bungee_BwDoubles-2}+{bungee_BwPractice-1}+{bungee_BwPractice-2}+{bungee_BwRank3v3-Champ-1}+{bungee_BwRank3v3-Champ-2}+{bungee_BwRank3v3-Cont-1}+{bungee_BwRank3v3-Cont-2}+{bungee_BwRank3v3-Open-1}+{bungee_BwRank3v3-Open-2}+{bungee_BwRank4v4-Champ-1}+{bungee_BwRank4v4-Champ-2}+{bungee_BwRank4v4-Cont-1}+{bungee_BwRank4v4-Cont-2}+{bungee_BwRank4v4-Open-1}+{bungee_BwRank4v4-Open-2}+{bungee_BwSolo-1}+{bungee_BwSolo-2}+{bungee_BwSquad-1}+{bungee_BwSquad-2}+{bungee_BwTrio-1}+{bungee_BwTrio-2}%

Hey, why this don't work?

barren token
mint fable
#

that's a lot of servers

trim solar
mint fable
#

well, in one placeholder

trim solar
#

i think is a limit of hd

trim solar
mint fable
#

ah

#

use javascript?

trim solar
#

thanks

mint fable
#

👍

mint fable
barren token
mint fable
#

plugins/placeholderapi/expansions/

#

then you can redownload after if needed

#

also, I recommend stopping the server, deleting, then starting the server

stoic garnet
#

I need some help with the changeoutput and scoreboard api

#

for some reason this isnt working
%changeoutput_equals_{objective_entryposhigh_coins_1}_green_&\uE002 Green Guardians_%

warm topaz
#

what does /papi parse me %objective_entryposhigh_coins_1% return

#

and what isnt working exactly

turbid tide
#

maybe they're using the updated version with the new format? xD idk just saying

stoic garnet
wet basinBOT
#

@mint fable Unknown expansion.

stoic garnet
wet basinBOT
#

@mint fable Unknown expansion.

mint fable
#

smh

turbid tide
#

its scoreboardobjective or whatever

mint fable
#

with an s||mh||

warm topaz
#

oh why does the name and identifier not match up

#

isnt that not allowed

mint fable
#

l3thalbunny

stoic garnet
#

ive already downloaded it

mint fable
#

they made it so long ago

#

😂

#

it was officially released on spigot @warm topaz

warm topaz
#

🥴

stoic garnet
#

still isnt working sad_fingerguns

warm topaz
#

does the coins objective exist

mint fable
#

case sensitive

stoic garnet
#

yea it does

mint fable
#

wait

mint fable
stoic garnet
#

yea

mint fable
stoic garnet
#

ye

mint fable
#

not the commands?

stoic garnet
#

i did both

mint fable
#

where did you put the one from spigot

stoic garnet
#

the plugins folder

mint fable
#

you can delete that

#

I was just showing Kaliber the page

#

the commands downloaded what you needed

stoic garnet
#

oh okay

mint fable
#

and it works, but entryposhigh seems to not be

#

I belive you need {}

#

around the coins and the #

#

and I believe that's my doing, to support underscores :L

#

so you're gonna have to use javascript instead of changeoutput

#

since you can't nest the {} like that

warm topaz
#

🥴

#

how come u used {}

stoic garnet
#

%changeoutput_equals_{objective_entryposhigh_{coins}_{1}}_green_&\uE002 Green Guardians_%

warm topaz
#

yeah that wont work

turbid tide
#

yeah that won't work

mint fable
#

what do u want me to use

#

I just did it for a guy that wanted it basically

warm topaz
#

shouldve added support for escaping the underscores instead probably

#

\_

mint fable
#

maybe

#

I hate using underscores in placeholders

#

pita

#

in checkitem I use , to separate instead and just allow people to \,

#

_ is so common

stoic garnet
mint fable
#

before I do

warm topaz
#

do u know how to use the javascript expansion

mint fable
#

/papi parse me %objective_entryposhigh_{coins}_{1}% works right?

#
var placeholder = "%objective_entryposhigh_{coins}_{1}%"
var out = ""

if( placeholder === "green" )
  out = "&\uE002 Green Guardians"

out
stoic garnet
mint fable
stoic garnet
tender vaporBOT
stoic garnet
#

now what

mint fable
#

use it in-game

#

/papi parse me %javascript_<your-script-name>%

stoic garnet
#

it replied with

#

%/uE002 Green Guardians%

mint fable
#

did you put extra %% around it?

stoic garnet
#

oh

#

yea

#

1se c

mint fable
#

ok

#

well it works

#

so now you use that

stoic garnet
#

color codes dont work for some reason

mint fable
#

idk what the \uE002 is

#

should it just be &2

#

or &a

turbid tide
#

nah.

sterile heart
#

hello wanted to ask if %vault_rank% would work on Deluxehub 3 Scoreboard

stoic garnet
turbid tide
mint fable
#

§2

turbid tide
#

nah. just google E002. its a symbol. not ampersand and not section symbol

#

no idea what its called

turbid tide
#

as long as DHub 3 supports PlaceholderAPI

#

its up to each plugin to add support for PlaceholderAPI

sterile heart
#

ok ty

mint fable
turbid tide
mint fable
#

is that just a symbol he's wanting to use?

turbid tide
#

I assume so

mint fable
#

ah

turbid tide
#

probably replaced by a custom font or something

#

with an image

mint fable
#

cause it came out E002

turbid tide
#

or like an icon

turbid tide
#

since papi doesn't translate those

#

its up to the plugin to translate those I think

#

or maybe the file encoding. idk

mint fable
#

it's a square i thought, where did you see that symbol?

turbid tide
#

google

mint fable
#

ya, I just figured his resource pack would replace it ig

#

what did you google for it

#

I'm on unicodelookup and put E002 as the hex and just got a square

turbid tide
#

\uE002

mint fable
#

okay I see

#

it is a square

sterile heart
#

and what is the placeholder for ping?

mint fable
#

but replaced by certain fonts, or in this case, resource packs/translations

mint fable
mint fable
#

§2 dark green?

stoic garnet
#

dw i got it

mint fable
#

what did you end up doing

stoic garnet
#
var out = ""

if( placeholder === "red" )
  out = "§r §cRed Rabbits"

if( placeholder === "orange" )
  out = "§r §6Orange Ocelots"

if( placeholder === "yellow" )
  out = "§r §eYellow Yaks"

if( placeholder === "lime" )
  out = "§r §aLime Llamas"

if( placeholder === "green" )
  out = "§r §2Green Guardians"

if( placeholder === "cyan" )
  out = "§r §3Cyan Creepers"

if( placeholder === "aqua" )
  out = "§r §bAqua Axolotls"

if( placeholder === "blue" )
  out = "§r §9Blue Bats"```
mint fable
#

nice

#

tbh

#
var placeholder = "%objective_entryposhigh_{coins}_{1}%"

function changePlaceholder(){
  if( placeholder === "red" )
    return  "§r §cRed Rabbits"
  if( placeholder === "orange" )
    return  "§r §6Orange Ocelots"
  if( placeholder === "yellow" )
    return  "§r §eYellow Yaks"
  if( placeholder === "lime" )
    return  "§r §aLime Llamas"
  if( placeholder === "green" )
    return  "§r §2Green Guardians"
  if( placeholder === "cyan" )
    return  "§r §3Cyan Creepers"
  if( placeholder === "aqua" )
    return  "§r §bAqua Axolotls"
  if( placeholder === "blue" )
    return "§r §9Blue Bats"
}
changePlaceholder()
#

that should make it ever so slightly more efficient since it doesn't have to go through every if statement

#

not that it really matters

stoic garnet
#

okay i ran into another problem

#

so basically what im using this for is a cool sidebar and for some reason instead of only making 1 part the color thing it makes it all the color

#

i wish i could send a ss

#

but it doesnt let me

#

@mint fable do you know how to fix that

mint fable
#

?imgur

tender vaporBOT
stoic garnet
vivid sparrow
#

use white

mint fable
#

f

stoic garnet
#

there we go

mint fable
#

noice

stoic garnet
#

now

#

its time for the hard part i think

#

uh basically

mint fable
#

idk the red rabbit looked pretty cool

#

like a boss

stoic garnet
#

lmao

mint fable
#

😂

#

killer bunny

stoic garnet
#

heres what it looks like now

#

so thats good

mint fable
#

ohh it was already red

#

nice

stoic garnet
#

but what i want now is

#

i want it to show what team is infront of you in coins and the one behind

#

let me get a ss

mint fable
#

so #1, and +1, self, and -1?

stoic garnet
#

yes

mint fable
#
var pos = parseInt(args[0])
var placeholder = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%"+"objective_entryposhigh_{coins}_{"+pos+"}%")

function changePlaceholder(){
  if( placeholder === "red" )
    return "§f §cRed Rabbits"
  if( placeholder === "orange" )
    return "§f §6Orange Ocelots"
  if( placeholder === "yellow" )
    return "§f §eYellow Yaks"
  if( placeholder === "lime" )
    return "§f §aLime Llamas"
  if( placeholder === "green" )
    return "§f §2Green Guardians"
  if( placeholder === "cyan" )
    return "§f §3Cyan Creepers"
  if( placeholder === "aqua" )
    return "§f §bAqua Axolotls"
  if( placeholder === "blue" )
    return "§f §9Blue Bats"
}
changePlaceholder()
#

we are going to adapt this

stoic garnet
#

is that the java script

mint fable
#

so now it will take an argument

stoic garnet
#

should i put that in the script

mint fable
#

wait

stoic garnet
#

also if u can

mint fable
#

now do it

stoic garnet
#

change the §r to §f

mint fable
#

oh

#

okay take it now

#

what did you name the script?

#

just so I know

stoic garnet
#

example

mint fable
#

%javascript_example_<position>%

#

that's how we use it now

#

now... doing +-1 is gonna be tricky

#

sounds like a lot of placeholders that are going to be nested

#

so prob gotta use js

#

I can try working on a script for you in a little bit if you want, might be a little complicated

stoic garnet
#

alright

#

sure

#

in the meantime

stoic garnet
#

wait

#

@mint fable but the positions change depending on what place you are

#

so if youre 6th itll show 5th

mint fable
#

that's why I'm saying plus and minus 1 will be tricky

#

to show 5th and 7th if you're in 6th

stoic garnet
#

oh

#

alright

willow pewter
mint fable
#

?paste

tender vaporBOT
mint fable
mint fable
#

not sure which one it is or if there is more to the error or not

mint fable
#

%statistic_PLAYER_KILLS%

midnight egret
#

ok i will try

magic rock
mint fable
mint fable
#

didn't want to redo it all, they wrote the if statements

#

i'll probably edit the same script and send it back later

#

for the +-1

#

unless you wanna do it 😉 @magic rock

stoic garnet
#

sorry im kinda in a rush so

mint fable
#

prob an hour or so

#

been here quite a bit today so far

stoic garnet
#

alright

mint fable
stoic garnet
#

ill wait

#

idm

mint fable
#

you can also try making the javascript but I think you said you don't know it

stoic garnet
#

i dont lmao im stupid as hell

mint fable
#

aight lmao

#

i'll fs be able to get you something though

stoic garnet
#

alright

#

@mint fable in the meantime I wanna know how to use team prefixes/team suffixes

#

with placeholders

#

since last time i did they just didnt work

mint fable
#

there are 2 it seems

#

team and teams

wet basinBOT
#

@mint fable Unknown expansion.

mint fable
#

oh, only one on the ecloud

#

that's more updated

stoic garnet
mint fable
#

it's vanilla teams

mint fable
tame willow
#

Are there any difference between %statistic_hours_played% and %statistic_time_played:hours%?

stoic garnet
mint fable
stoic garnet
#

so do i do %team_prefix_<team_name>%

tame willow
#

I couldn't understand

mint fable
tame willow
#

thanks

mint fable
stoic garnet
#

or is there no way

mint fable
#

I don't think there's a way

stoic garnet
#

sadge

mint fable
#

do you use the prefixes elsewhere?

stoic garnet
#

wdym

mint fable
#

idk, above names or something

#

i don't really know how teams work in vanilla

stoic garnet
#

i use the suffix as a timer

mint fable
#

could you store it to a custom objective instead?

stoic garnet
#

i could try

tame willow
# mint fable no difference

One more question
when I try papi parse MetuMortis %statistic_hours_played% from console it logs blank string. Does this mean player must be in the game to use this placeholder

mint fable
#

i should think about using vanilla objectives to store data more often

tame willow
#

thanks

stoic garnet
#

@mint fable how do i make a timer with placeholder api

stoic garnet
#

mb

edgy sapphire
tender vaporBOT
edgy sapphire
#

Oops, sorry

stoic garnet
toxic nest
#

is this correct way of detecting if at least 1 requirement is true?

    view_requirement:
      minimum_requirements: 1
      requirements:
        tier_1: # This requirement will check if they have the rank, and if they do it will show the has_vip item instead.
          type: string equals ignorecase
          input: '%custom_placeholder%'
          output: '1'
        perm_1:
          type: "has permission"
          permission: floor.staff

I tried this and it only check the permission one for some reason, if the permission is false it blocks the view

mint fable
#

stop_at_success: true

#

@toxic nest

stoic garnet
#

@mint fable are you makin' the script or nah

stoic garnet
#

oh my god i forgot

#

im sorry

#

can anyone please help me

#

can anyone help me ive been waiting for someone for 3 hours now

mint fable
#

You're asking for a very customized project to be done

#

It's not just basic plugin or placeholder help

mint fable
cosmic needle
#

cj is a busy lad

mint fable
#

I'm not going to lie, most of my javascript just comes from me googling "xyz javascript"

stoic garnet
#

sorry im just not really patient

mint fable
#

?help

tender vaporBOT
stoic garnet
#

well does anyone know how to use the teams placeholder api

mint fable
#

just state what you want to do

#

if people can help, they will

#

but they won't know if they can help until you fully lay it out for them

stoic garnet
#

im trying to make a timer on my sidebar that i made with a plugin called "TAB" and the minigame that i made was made in datapacks therefore its kinda hard to transfer stuff like team suffixes and team prefixes and all that stuff so i was wondering if placeholder could help since it probably has something

steep talon
#

Is there a way to have a leaderboard with top ingame moneymaker of the week, that auto resets. SImilar to how topvoter of the month works?

red prairie
#

how do i import placeholder api into my plugin via POM

mint fable
#

@stoic garnet looking at the scoreboardobjectives extension, it doesn't look like it's possible to do what you want

mint fable
#

There is no way to tell what position a certain entry is on the leaderboard

#

Is there a maximum number of teams?

#

it would then be more do-able

stoic garnet
#

8

mint fable
#

always 8 or no

stoic garnet
#

always 8

mint fable
#

How do you know which team you're on?

#

%team_name%?

#

I presume that would work, ye?

#

I started work, will lyk when I finish prob later tonight

stoic garnet
stoic garnet
thorn snow
#

Morning, so i was using CheckItem-Expansion yesterday and found an issue with nbtstrings

#

Im using 1.19, but this morning i found a solution and just wanted to ask if it could be updated. All that needs to happen is the dependencies in the pom need updating

#

Like below and this seems to fix the issue i was having with nbt not working```
<artifactId>spigot-api</artifactId>
<version>1.19-R0.1-SNAPSHOT</version>

        <artifactId>placeholderapi</artifactId>
        <version>2.11.2</version>

        <artifactId>item-nbt-api</artifactId>
        <version>2.10.0</version>```
#

If it could be updated officially that would be amazing

stone edge
#

It definitely does, 2.9.2 works til 1.18 only. Maybe make a PR

fair haven
#
java.lang.NullPointerException: Cannot read field "left" because "r" is null
        at java.util.TreeMap.rotateLeft(TreeMap.java:2543) ~[?:?]
        at java.util.TreeMap.fixAfterInsertion(TreeMap.java:2610) ~[?:?]
        at java.util.TreeMap.addEntry(TreeMap.java:770) ~[?:?]
        at java.util.TreeMap.put(TreeMap.java:828) ~[?:?]
        at java.util.TreeMap.put(TreeMap.java:534) ~[?:?]
        at com.extendedclip.papi.expansion.vault.VaultEcoHook.setBalTop(VaultEcoHook.java:110) ~[?:?]
        at com.extendedclip.papi.expansion.vault.BalTopTask.run(BalTopTask.java:56) ~[?:?]
        at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[pufferfish-1.18.2.jar:git-Pufferfish-72]
        at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[pufferfish-1.18.2.jar:git-Pufferfish-72]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[pufferfish-1.18.2.jar:git-Pufferfish-72]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]```
#

What's this?

paper oxide
#

why every time that i try to dowload Javascript extension my papi just stop woking

#

[15:27:57] [Client thread/INFO]: [CHAT] An internal error occurred while attempting to perform this command
[15:28:05] [Client thread/INFO]: [CHAT] PlaceholderAPI configuration reloaded!

#

im using the command /papi ecloud dowload Javascript and then /papi reload

thorn snow
#

No probs buddy

mint fable
#

@stoic garnet yo

stoic garnet
#

yo

mint fable
#

lot more complicated than originally thought

#

but what if you're 1st/2nd place

#

what do the other lines show

stoic garnet
#

lemme check 1 sec

mint fable
#
1. 1st place
2. One above you
3. You
4. One below you
stoic garnet
#

when your in first it shows the 3 teams behind u

mint fable
#

If first

1. 1st place
2. 2nd place
3. 3rd place
4. 4th place
stoic garnet
#

yea

mint fable
#

same thing for 2nd?

stoic garnet
#

yep

#

and its basically the same logic for 7th and 8th

mint fable
#

so uh

stoic garnet
#

if your 8th/7th
5. 5th place
6. 6th place
7. 7th place
8. 8th place

mint fable
#

wait

mint fable
#

you want it to show ALL teams?

#

I thought you wanted first place, one above you, you, one below you

stoic garnet
stoic garnet
#

thats if your 8th or 7th

mint fable
#

because you just did 5 6 7 8

stoic garnet
#

wait

mint fable
stoic garnet
#

oh wait

#

im so stupid LMFAO

mint fable
#

if you're 8th though, do you want to show 2 people above you instead of 1 above/below?

stoic garnet
#

yea

mint fable
#

okay well try the script I sent for now

#

name it scoreboard

stoic garnet
#

aight

mint fable
#

%javascript_scoreboard_name,#% to get the translated name of the team in # position

#

(not sure if you'll need it though)

#

%javascript_scoreboard_line,#% to get the line

#

so I did 4 lines: 1 2 3 4

#

this might end up being laggy fyi

#

it is javascript afterall

#

vs an actual java plugin

stoic garnet
#

so do i change the original name of the script from example to scoreboard_name

mint fable
#

and it runs the engine every time it's called

stoic garnet
#

oh

mint fable
#

name and line are "methods"

mint fable
stoic garnet
#

alright

#

and the other script will be named?

mint fable
#

only 1 script

mint fable
stoic garnet
#

ill do that

#

idm aslong as it works

mint fable
#

okay try that, should be good

stoic garnet
#

i had to reset my server yesterday, what expansions do i download again?

mint fable
#

I think just javascript and teams for this

#

ooh

#

scoreboardobjectives

stoic garnet
#

this isnt working for some reason
/papi parse me %javascript_scoreboard%

mint fable
#

%javascript_scoreboard_name,#% to get the translated name of the team in # position

#

%javascript_scoreboard_line,#% to get the line

#

so your scoreboard should be

%javascript_scoreboard_lines,1%
%javascript_scoreboard_lines,2%
%javascript_scoreboard_lines,3%
%javascript_scoreboard_lines,4%
stoic garnet
#

that isnt working either

#

it just comes back with blank

wheat grail
#

Hi. I am currently having trouble with the vaults placeholders. I have added the vaults placeholder to my current scoreboard plugin, but all it is doing is the showing the placeholder in the scoreboard as %vault_eco_formatted%. I have installed the placeholder and reloaded placeholderapi. Any reason why it is not loaded or anyway to fix it?

mint fable
mint fable
#

send your javascripts config

stoic garnet
#

it doesnt let me send a file

mint fable
#

?paste

tender vaporBOT
mint fable
stoic garnet
#
# Version: 2.11.2
# Created by: extended_clip
# Contributors: https://github.com/PlaceholderAPI/PlaceholderAPI/graphs/contributors
# Issues: https://github.com/PlaceholderAPI/PlaceholderAPI/issues
# Expansions: https://api.extendedclip.com/all/
# Wiki: https://github.com/PlaceholderAPI/PlaceholderAPI/wiki
# Discord: https://helpch.at/discord
# No placeholders are provided with this plugin by default.
# Download placeholders: /papi ecloud
check_updates: true
cloud_enabled: true
cloud_sorting: name
cloud_allow_unverified_expansions: false
boolean:
  'true': 'yes'
  'false': 'no'
date_format: MM/dd/yy HH:mm:ss
debug: false
expansions:
  javascript:
    debug: false
    github_script_downloads: false
    argument_split: ','
    use_quick_js: false```
mint fable
#

that's the papi config

stoic garnet
#

oh

mint fable
#

I need the javascript.yml or whatever

stoic garnet
#
# This is the main configuration file for the Javascript Expansion.
# 
# You will define your javascript placeholders in this file.
# 
# Javascript files must be located in the:
#  /plugins/placeholderapi/javascripts/ folder
# 
# A detailed guide on how to create your own javascript placeholders
# can be found here:
# https://github.com/PlaceholderAPI-Expansions/Javascript-Expansion/wiki
# 
# Your javascript placeholders will be identified by: %javascript_<identifier>%
# 
# Configuration format:
# 
# <identifier>:
#   file: <name of file>.<file extension>
# 
# Example:
# 
# 'my_placeholder':
#   file: 'my_placeholder.js'
example:
  file: example.js
mint fable
#

it's still named example

stoic garnet
#

oh

#

im not stupid

#

trust

stoic garnet
mint fable
#

whatever your file is named, keep it that way

#

if it's still named example.js keep it that way

#

but replace the example above it to scoreboard

#

honestly, it doesn't really matter

#

it's just for organization purposes if you need more javascripts later

#

really you can use %javascript_example_lines,1%

#

🤷‍♂️

stoic garnet
#
# This is the main configuration file for the Javascript Expansion.
# 
# You will define your javascript placeholders in this file.
# 
# Javascript files must be located in the:
#  /plugins/placeholderapi/javascripts/ folder
# 
# A detailed guide on how to create your own javascript placeholders
# can be found here:
# https://github.com/PlaceholderAPI-Expansions/Javascript-Expansion/wiki
# 
# Your javascript placeholders will be identified by: %javascript_<identifier>%
# 
# Configuration format:
# 
# <identifier>:
#   file: <name of file>.<file extension>
# 
# Example:
# 
# 'my_placeholder':
#   file: 'my_placeholder.js'
example:
  file: scoreboard.js
#

thats good right

mint fable
#

is your script saved as scoreboard.js?

stoic garnet
#

its named scoreboard so yea

mint fable
#

I'd also replace the example with scoreboard

#

then it'd be good

stoic garnet
#

now it says

#

script error

#

but it only does that when the 2nd to last line example is changed to scoreboard

mint fable
#

huh?

stoic garnet
#

but it still replies with blank

#

/papi parse me %javascript_scoreboard_lines,1% right??

mint fable
#

yes

#

theoretically

stoic garnet
#

well its just sending blank so idk what to do

mint fable
#

what if you do %javascript_scoreboard_name,1%

stoic garnet
#

same thing

mint fable
#

%objective_entryposhigh_{coins}_{1}%

stoic garnet
#

it replies with aqua

#

which is the highest

mint fable
#

what about that

#

idk what's up exactly so

stoic garnet
mint fable
#

?

stoic garnet
mint fable
#

test with %javascript_scoreboard_name,1% still fyi

stoic garnet
#

same thing

mint fable
#

give it a quick /papi reload

#

then try again

#

oh you prob do every time

stoic garnet
#

i do

#

lmao

mint fable
#

what about a restart

stoic garnet
#

alright 1 sec

mint fable
#

and also, send your javascripts.yml again

#

and a picture of your Placeholderapi/javascripts folder

#

?imgur

tender vaporBOT
stoic garnet
# mint fable and also, send your `javascripts.yml` again
# This is the main configuration file for the Javascript Expansion.
# 
# You will define your javascript placeholders in this file.
# 
# Javascript files must be located in the:
#  /plugins/placeholderapi/javascripts/ folder
# 
# A detailed guide on how to create your own javascript placeholders
# can be found here:
# https://github.com/PlaceholderAPI-Expansions/Javascript-Expansion/wiki
# 
# Your javascript placeholders will be identified by: %javascript_<identifier>%
# 
# Configuration format:
# 
# <identifier>:
#   file: <name of file>.<file extension>
# 
# Example:
# 
# 'my_placeholder':
#   file: 'my_placeholder.js'
example:
  file: scoreboard.js
stoic garnet
#

it says scoreboard.js tho

#

wait which line

mint fable
#

scoreboard.js is the file

mint fable
stoic garnet
#

when i do that it says Script error (check console)

mint fable
#

good

#

lol

#

I'd rather have an error than nothing

#

send the error

#

?paste

tender vaporBOT
mint fable
#

?startuplog

tender vaporBOT
stoic garnet
mint fable
stoic garnet
#

same thing

mint fable
#

can you send the error again

#

shouldn't be the exact same

mint fable
#

ooh

stoic garnet
#

mb

#

it worked

mint fable
#

fully?

#

all 4 lines?

#

if so then it's just time to test when you're at every position 1-8 in the scoreboard

stoic garnet
#

but theres 1 more thing i want to do

#

which shouldnt be that hard

#

i want it to show on the side of team name

#

the placement

#

and their coins

#

so like if your in 3rd with 8 coins

#
  1. Orange Ocelots 8
mint fable
#

I don’t know if that’s possible because I think the number on the right decides which order you see it

#

But you could just put the value itself next to the team name, not as the value way on the right

green osprey
#

(PAPI version: 2.11.2)

#

JS expansion:
2. Javascript clip Y 2.1.0

austere hawk
#

Hi, is this support for ServerTime PAPI expansion?

mint fable
austere hawk
#

um

#

I need to send images?

mint fable
#

?imgur

tender vaporBOT
austere hawk
#

So, I was sent here from the DiscordSRV support server because I need help with a date placeholder. I downloaded PAPI and ServerTime expansion and did the %servertime_<SimpleDateFormat>% placeholder. I need help making my server online and offline messages have a timestamp like this: <t:1657146564:R>. When I added %servertime_<SimpleDateFormat>% and started and shut down my server this is what my bot messaged. (Attached to this message is the bot's discord message (for start and stop) and the DiscordSRV config message (for start and stop).

https://cdn.austinispog.tk/Opera_Snapshot_2022-07-06_153304_discord.com.png <-- Discord messages
https://cdn.austinispog.tk/Opera_Snapshot_2022-07-06_153304_discord.com.png <-- DiscordSRV config

austere hawk
mint fable
#

that's fine

mint fable
austere hawk
#

also I accidently did the wrong messages for the second screenshot

#

here are the messages:

#
The server is online. Started error whilst parsing the date
The server is offline. Stopped error whilst parsing the date```
#

from the bot

mint fable
#

so, you'll probably want a custom js placeholder on top of servertime

mint fable
#

but you need a SimpleDateFormat first

#

we'll get there

austere hawk
#

ok

mint fable
#

try putting %servertime_MM/dd/yyyy HH:mm%

austere hawk
#

ok

#

I'm starting my server

mint fable
#

No idea how discord works with the whole 7 minutes ago thingy FYI @austere hawk

mint fable
#

but as long as you know how you integrate that part into discord then we're good

#

7/6/2022 5:39 PM CST

austere hawk
mint fable
#

ah

austere hawk
#

<t:1657147146:R>

#

<t:1657147146:R>

#

like that

mint fable
austere hawk
mint fable
#

the number

austere hawk
#

yes

#

I want the server stop and start messages to look like this:

mint fable
#

no no, I'm asking

#

what is 1657147146 do you know

austere hawk
#

The server is online. Started <t:1657147146:R>
The server is offline. Stopped <t:1657147146:R>

austere hawk
#

I think like it tells Discord when the time was or smth

mint fable
#

you didn't make the converter?

austere hawk
#

I just hooked it up to my custom domain so I don't have to remember another url lol

#

@mint fable

#

we are getting somewhere

#

Austin's Assistant
BOT
— Today at 3:39 PM
The server is now online. Started 07/06/2022 15:39

austere hawk
mint fable
austere hawk
#

ok

mint fable
#

type /papi ecloud download server /papi reload

#

then send the config

#

ooh actually

#

sorry

#

I found localtime

#

download that and try this

austere hawk
#

Placeholders:
%localtime_time%
%localtime_time_<SimpleDateFormat>%
%localtime_timezone_<TimeZoneID>%
%localtime_timezone_<TimeZoneID>,<SimpleDateFormat>%

#

which placeholder do I put?

mint fable
#

fuck it

#

javascript it is

#

javascript makes things easy

tender vaporBOT
austere hawk
#

lol

mint fable
austere hawk
#

do I delete the other expains?

mint fable
#

I'll send you it soon

mint fable
#

<t:1657147711175:f>

austere hawk
#

lol

#

<t:1657147711175:R>

green osprey
mint fable
#

lmao

austere hawk
#

ok I reloaded and added JS

austere hawk
#

in the expansion config?

mint fable
#

read the page

#

it'll tell you where it all goes

trim stratus
#

Why I everytime must reload papi, if I restart server?

green osprey
#

contains everything what u need

austere hawk
austere hawk
austere hawk
mint fable
#

y

austere hawk
mint fable
austere hawk
#

To test it, run /papi parse me %javascript_hello_world% (doesn't work in console)

And ta-da! example

#

that

#

it shows up as blank

mint fable
#

you reload, ye?

#

give it a nice /papi reload and try again real quick

#

Also, you can rename it all to whatever you want now, I suggest unixtime or something

austere hawk
#

yeah I did

mint fable
#
unixtime:
  file: unixtime.js```
austere hawk
#

ok

#

still returns blank

mint fable
#

and save this as unixtime.js

(Date.now()/1000).toFixed(0)+""
austere hawk
#

/
home
/
container
/
plugins
/
PlaceholderAPI
/
javascripts
/
unixtime.js

#

in that file?

mint fable
#

yes

austere hawk
#

ok

#

/papi parse me %unixtime%

mint fable
#

/papi parse me %javascript_unixtime%

austere hawk
#

It responded with 1657149515

mint fable
#

ig add the extra stuff in to the script too

#

why not

#

if it's only for discord

#
"<t:"+(Date.now()/1000).toFixed(0)+":f>"
#

or whichever format you want

#

or add it to discordsrv config

#

🤷‍♂️

austere hawk
#

ok

#

let me see if it works

mint fable
#

<t:1657149515:f>

austere hawk
#

<t:"+(Date.now()/1000).toFixed(0)+":f>

mint fable
#

?codeblocks

tender vaporBOT
mint fable
#

or if you surround with `` it escape formatting too _like_this

austere hawk
#
DiscordChatChannelServerShutdownMessage: "The server is now **offline**. Stopped <t:"+(Date.now()/1000).toFixed(0)+":f>"
``` like this?
mint fable
#

that's your script

austere hawk
#

ohhhh lmfao

mint fable
#

I was saying you can either add the <t::f> to the script

#

or to the discordsrv config

austere hawk
#

oh ok lol

#

<t:%javascript_unixtime%:f>

mint fable
#

ye

austere hawk
#

thats wierd

mint fable
#

Did you put the right placeholder

#

Do you know which player it parses placeholders for?

austere hawk
#

wdym?

mint fable
#

in papi, placeholders get parsed for a specific player

mint fable
#

Just to make sure it's still working type /papi parse --null %javascript_unixtime%

#

if that works then we might have to ask discordsrv

#

@austere hawk this

austere hawk
#

ok ty

#

same thing :(

mint fable
#

can you elaborate

steep talon
#

can we make it so a placeholder resets every 7 days? eg: for %eco_balance% etc
using placeholder api, or is it inbuilt into what ever plugin im using?

errant iron
#

PlaceholderAPI only acts as an API to transfer data between plugins

#

It doesn't cache and it doesn't actually provide any data itself

#

So %eco_balance%, you'd have to have it so that your economy plugin resets balances every 7 days or whatever you want there

rapid trail
#

I'm having issues with PAPI extension Player, where %player_direction% outputs different things depending on the location on the server.

You can see below that /compass outputs N with 359 degrees, but papi parse me %player_direction% returns NW
https://ibb.co/dBXrh4k

I have tried this in 3 location on my server so far and the closer i am to 0, 0 the center of the world the more inaccurate some of the directions become. I have tracked the following.yml N is set from 0-23 # should be 337.5 to 22.5 NE is 24-67 # should be 22.5 to 67.5 E is 67 to 113 # should be 67.5 to 112.5 SE is 113 # should be 112.5 to 157.5 S is 114-179 # should be 157.5 to 202.5 180 returns NOTHING SW is 181-239 # should be 202.5 to 247.5 W is 240-300 # should be 247.5 to 292.5 NW is 301-359 # should be 292.5 to 337.5

Is there any reason this might be happening? Any way to try and fix this on my end? Like i said, when I'm further away from the centre of the world it start working properly.

And here when i'm facing south, /compass outputs S with 180 degrees, but papi parse me %player_direction% returns BLANK
https://ibb.co/mbfv3Yn

errant iron
#

that is how it is calculated in the expansion

#

there is probably some room for improvement lmao

austere hawk
mint fable
#

when you type /papi parse --null %javascript_unixtime%

steep talon
#

Thankyou Star!

mint fable
simple nova
#

cj

#

do u have a javascript code that make placeholder to change smoothly rgb colors

thorny yoke
#

um, I'm still stuck with this, could anyone help or make a change?

willow pewter
willow pewter
balmy marten
willow pewter
balmy marten
#

So yeah, slowly add back expansions till it fails

willow pewter
#

ok so i did that, they're all fine but then when i retstart the server they're all back to showing the raw text again. As soon as I do /papi reload they go back to normal

rapid trail
#

i think someone forgot to put the latest Player expansion on e-cloud.
https://ibb.co/7gxftMw

the github has 2.0.3 but latest available through ecloud is 2.0.2.

cedar narwhal
#

08:28:07 WARN]: [PlaceholderAPI] [math] Invalid Placeholder detected!
[08:28:07 WARN]: [PlaceholderAPI] [math] Placeholder: %math_(precision:0/60)%
[08:28:07 WARN]: [PlaceholderAPI] [math] Cause: '(precision:0/60)' is not a valid Math Expression.

#

help someone

balmy marten
earnest sky
#

something weird going on w/ papi on 1.18

#

tried updating and all placeholders just broke

warm topaz
cedar narwhal
#

Ok

stone edge
earnest sky
stone edge
#

if you mean expansions, ofc

earnest sky
#

Nvm apparently it works now yeah it was all expansions

stone edge
#

you are updating to a totally brand new version

earnest sky
#

There was one expansion that was bugging so we deleted it and reloaded all expansions

stone edge
earnest sky
#

never had that issue before, thanks for the help 🙂

stone edge
pseudo pagoda
#

Oi! so uhm i have this thing a join/leave message customizer thingy so i have a config file and i made it so it'll print out what's in the config file and i have the placeholder dependency enabled so i asked my friend why is the %player% isn't loading from the config file and he told that you so something with setPlaceholders.fillinplaceholders so i have the doubt that where should i input that setPlaceholders.fillinplaceholders to let it print our the placeholder "%player%

junior musk
#

?player

tender vaporBOT
rapid trail
wheat grail
#

Hi. I am currently having trouble with the vaults placeholders. I have added the vaults placeholder to my current scoreboard plugin, but all it is doing is the showing the placeholder in the scoreboard as %vault_eco_formatted%. I have installed the placeholder and reloaded placeholderapi. Any reason why it is not showing its vaule or anyway to fix it?

stone edge
#
  1. Error on start
  2. You dont have vault
  3. You dont have the vault expansion
  4. You dont have an economy plugin with vault support
  5. Your scoreboard doesnt work
wheat grail
#
  1. No errors on startup
  2. I have the latest version of vaults (compiled)
  3. Expansion installed, reloaded both the plugin and server
  4. Using essentials latest version
  5. Using featherboard
pulsar cipher
stone edge
#

featherboards support placeholdderapi?

wheat grail
stone edge
#

I mean, thats not PlaceholderAPI

stone edge
wheat grail
stone edge
hybrid horizon
#

Hello, i have problem with %bungee_server% for some reason placeholder
registers the number of players on the server, but does not reset when the player exits, and now i have over 99 players on survival and 400 in lobby 😄 did someone meet with something like this? how to fix it?

#

'0': §fW grze §6%bungee_survival% §fgraczy

short shoal
hybrid horizon
rugged widget
#

some of the colors of my placeholders dont work

#

on scoreboard

hybrid horizon
stone edge
#

you downgraded? if so, all should be as before

rugged widget
#

yea i downgraded

#

works fine

stone edge
#

but?
Edit: I guess there wasnt a "but" at all, good!

heavy zealot
#

Does anyone know how to put the nbt for pixelmon?

#

'slot1':
material: PIXELMON_PIXELMON_SPRITE
nbt_strings:
- 'form:%pixelmon_party_1_form%'
- 'palette:%pixelmon_party_1_palette%'
nbt_ints:
- 'ndex:%pixelmon_party_1_dex_number%'
- 'gender:%pixelmon_party_1_gender%'

#

I tried this way but it doesn't work

stone edge
#

PlaceholderAPI doesnt support forge/sponge afaik

zenith moth
#

For some reason /papi ecloud download TownyChat -> /papi reload seems to break papi, since papi upon reload does not register the hook and later returns "No expansions available to list" when doing /papi ecloud list installed despite hooks having been downloaded and registered. Any help?

#

and I know it is for sure specifically TownyChat hook doing it

tender vaporBOT
zenith moth
pulsar cipher
#

/papi parse GizliBaskan %statistic_minutes_played% results 0

#

There is a problem with papi's Statistic.

#

there is no wrong other placeholders but statistic.. @final shadow are u there?

heavy zealot
#

and it's working perfectly for me, it's just that option that I can't get to work

stone edge
#

you mean you are using PlaceholderAPI from spigotmc

zenith moth
#

Any help regarding my question? Would like it solved asap

stone edge
#

update Towney

#

or maybe ask in Towney support

zenith moth
#

Towny support told me to go here, and I have no other reason to not do so since townychat addon by itself works fine, but since that causes incompatibility we have to use papi, but apparently downloading townychat there breaks everything

#

all towny files are also fully up to date

stone edge
#

issue is the expansion

zenith moth
#

well where does papi get the expansion from?

stone edge
#

from ecloud, which is uploaded by the dev who made the expansion

zenith moth
#

I'll ask him then

stone edge
#

in this case, seems to be Clip

zenith moth
#

because it confused me since latest townychat version is 0.96 but papi said 1.2

stone edge
#

mmmm i dont get the actual issue here

#

are you using TownyChat plugin?

zenith moth
#

nope

stone edge
#

then why you downloaded it?

zenith moth
#

because I need its placeholders

stone edge
#

thats for the plugin

#

TownyChat

#

you use that plugin

#

?

zenith moth
#

you might have a point, I'll try reinstalling papi and try without and see if stuff works

#

It would be good if I could submit images here

tender vaporBOT
zenith moth
#

Yes that worked Alonso, thanks. Guess it was just me being dumb :p

stone edge
pulsar cipher
heavy zealot
#

Is there a way to add more than one input with its output

#

requirements:
test0:
type: string equals
input: ''
output: ''
test:
type: string equals
input: ''
output: ''

#

something like this ?

austere hawk
austere hawk
#

which is blank

#

it send a blank responce

outer viper
tender vaporBOT
outer viper
#

that appears to fix it