#placeholder-api

150650 messages · Page 33 of 151

paper grail
#

oh im reading that rn

#

Thanks

turbid tide
#

or if all you need is imports then its just import me.clip.placeholderapi.PlaceholderAPI;

paper grail
#

appreciate

#

god this is confusing

#

actually..

#

Is it possible from within the Javascript PAPI extension to get data from localhost?

turbid tide
#

ugh I think you can get data from files that are in plugins/placeholderAPI/javascripts/javascript_data

#

but I'm not sure if any files or just special named ones

paper grail
#

Because I could do something like

/* PAPI CRAP fgHEUEIU */
const player = "%player_name%"
const lvl = data('../../grakkit/storage/survival/stats.json').player.lvl;
const dataLoc = "%player_name%.level";

function survivalLevel() {
  Data.set(DataLoc, lvl);
  Placeholder.saveData();

  return lvl;
}

survivalLevel()```
#

I think this is how papi handles crap based on the wiki

#

is there an equivalent to js const lvl = data('../../grakkit/storage/survival/stats.json').player.lvl; in PAPI tho?

#

Where's that in the docs

paper grail
#

am I able to pull data from other directories?

#

Like a json file I have on Grakkit that stores the user's level and progression

mint fable
#

I think you might be able to access some bukkit classes

#

I mean, it's javascript

turbid tide
#

const is not a thing in nashroon btw.

mint fable
#

so you probably can load a file somehow

paper grail
#

alr

paper grail
#

Okay, perhaps the way I'm wording this is confusing

#

and also i suck at js

#

so..

#

Say I have a script that checks the value of Potatoes.

#

The number of Potatoes are located in /plugins/grakkit/storage/potatoes.json

#

In PlaceholderAPI, am I able to read that json file?

prisma geyser
#

hi

im trying to use placeholderapi to get placeholders for deluxehub

what placeholder should i use for the rank

icy patrol
#

I am trying to use the expansion OtherPlayer and it keeps giving a output of PNF

turbid tide
#

that means Player Not Found

#

you can't use it for players that are offline

paper grail
#

ok im back for the 3rd time

#

I made a simple script that imports data from a json

#

but when I parse the placeholder it complains that it expected an operand but found import

#
import * as data from '../test.json';
function survivalLevel () {
   return data.name;
}
survivalLevel();```
#

#test.json

{
   "name": "potato"
}
#

expected output: "potato"

turbid tide
#

ugh import is not a thing in javascript. or is that the thing you're using?

paper grail
#

oh it isn't?

#

well ill just go ahead and f**k myself then @turbid tide

#

Is there an "alternative"?

#

ik require() isn't a thing, that's from NodeJS and multiple people suggested it 😦

zenith badge
#

@austere hawk

#

just checkni

icy patrol
#

is their any expansion that tracks the number of diamonds mined?

paper grail
#

Wait.. So java-based expansions can access the internet and stuff but we can't do the same with js?

turbid tide
#

I mean its javascript. idk for sure what the limitations are.

paper grail
#

idk It's just annoying bc I can't think of any way to access another file and considered using a url or something

#

but even that wont owork

dense burrow
#

Hi
I'm trying to make a custom menu to show if a player has a specific group but i can't figure how i'd get the placeholder to work for the player name that's entered
i know /papi parse <username> %luckperms_in_group_<group>% gives me what i need for the username but i need a way to have it show without the command

turbid tide
#

@dense burrow use this expansion ^

dense burrow
#

thanks

dense burrow
#

@turbid tide does the player have to be online?

tender vaporBOT
#

@dense burrow,

mint fable
#

yes

turbid tide
#

^

#

most placeholders require an online player

#

very few added offline support. mostly because its impossible without saving the data somewhere.

dense burrow
#

okay thanks, sorry for that tag btw

near sentinel
#

trying to use the placeholder %pingerplayers<ip>:<port>% but its not showing players online on one of my servers

rose rain
#

What's the placeholder for the number of votes a player has?

turbid tide
near sentinel
turbid tide
#

so are you sure you've downloaded the pinger expansion?

#

on that server?

near sentinel
#

yes

turbid tide
#

like /papi ecloud download Pinger /papi reload

#

and go to plugins/PlaceholderAPI/config.yml

#

and change pinger update time to 1 second

#

instead of 30

#

then do /papi relaod

#

can you also join the server? to see if it updates for me

#

or if its stuck at 0

wet creek
#

can someone come in clutch with the essentials eco balance placeholder?

wet creek
#

blitz 😅

#

wanna come in clutch with the vault placeholders?

#

I can't find the

#

please blitz ily

wet creek
#

k new question

#

whats tyhe vault money prefix that has the k and M?

#

so like 1M

#

or 20k

wise goblet
#

formatted

frozen dew
#

Is there anyway to use placeholders like %vault_eco_top_balance_commas_#% %vault_eco_top_player_#% without the need of having an economy plugin, i was told you need one but like i just have essentials and vault the /baltop message i wanna json it and limit it, this is the easy part but i cant use those placeholders without the need of a 3rd plugin correct?

wise goblet
#

You can code one if you want.

warm topaz
#

what

#

if u have vault and essentials u dont need anything else (if were excluding placeholderapi as its kinda seperate)

wise goblet
#

tbh what ever u do, even tho if u limit the top players, you can't reduce the lag from it.

warm topaz
#

just download the vault expansion
/papi ecloud download vault
/papi reload

wise goblet
#

He wants to limit it, so it causes less lag I think

#

Tho no one can limit that, unless you increase the delay of which balance top rearranges.

austere hawk
#

Is there a placeholder for user ping? Because I saw in some servers when you hoover your mouse over a person's name with Deluxechat, it shows their ping.

warm topaz
#

%player_ping% i think

#

yeah. make sure to run the commands at the bottom of the embed @austere hawk

austere hawk
#

Okay thanks

pseudo dawn
#

https://imgur.com/a/qCiQ2Fr %discordsrv_user_islinked%
How do I replace yes and no with my own values?
Tried this, it didn't work:

    yes: '&6DL'
    check_interval: 30
    no: '&aDUL'```
pseudo dawn
#

@warm topaz @wise goblet

wise goblet
#

I don't use discordsrv

quick relic
#

how do i get tps percentage like if tps equals 20 it'll say 0% if tps equals 1 or something it'll say 100% how can i do that?

wise goblet
#

use maths @quick relic

quick relic
#

my math is not enough for that

wise goblet
#

;-;

pseudo dawn
wise goblet
turbid tide
wise goblet
quick relic
#

oh ok

turbid tide
pseudo dawn
turbid tide
#

well because that's pinger

#

it has its own way to change that

#

but discorsrv most likely uses the PAPI boolean option

#
boolean:
  'true': 'yes'
  'false': 'no'
#

this is what you have to change ^

steep thorn
#

Maybe if you negate this permission, it would be more efficient since it doesn't request the balance of every player

#

Although this does seem to check for Essentials as well so I don't really know

quick relic
steep thorn
#

@quick relic define 'not working', what is is showing?

wise goblet
#

Can I join ur serv

#

To test it

steep thorn
#

@wise goblet whose server?

wise goblet
#

Dark's

quick relic
#

says provided value is invalid

#

and unkown unary operator ' at position 6

#

i am sending you ip from dms

wise goblet
steep thorn
#

Yeah but didn't he want to disable it?

wise goblet
#

Use server_tps_1

wise goblet
quick relic
#

it works

#

thanks

pseudo dawn
tender vaporBOT
#

@pseudo dawn,

turbid tide
#

PAPI

pseudo dawn
#

In config.ynl?

turbid tide
#

yes

pseudo dawn
#
  'true': 'yes'
  'false': 'no'
expansions:
  discordsrv:
    yes: '&6DL'
    check_interval: 30
    no: '&aDUL'

Is that how it works?

turbid tide
#

nooo ..

#
boolean:
  'true': 'yes'
  'false': 'no'```
#

change yes

#

and no

#

to whatever you want to be instead

pseudo dawn
#

Thx!

silver minnow
quick relic
#

it worked

#

with math

silver minnow
#

k 🙂 that's good

pseudo dawn
#

How do I remove zeros after a point in math?

warm topaz
#

[precision:0]

pseudo dawn
#

Thanks!

rain roost
#

What's wrong with what i got here?

#

/papi parse me killstreak

#

/papi parse me %identifier_killstreak%

#

/papi parse me %killstreak%

austere hawk
#

Good day,
I have a server on 1.7.10 where I host Annihilation.
And when I want to display motd on the lobby via Pinger, it throws me out motd what is set in server.properties. It does not want to show motd which is modified by that plugin

austere hawk
#

In Math, can we get rid of floats?

warm topaz
#

yes, add [precision:0] to the placeholder and itll remove the decimals

frozen dew
worn flax
#

where can i ask help for DeluxMenus?

warm topaz
worn flax
#

thanks

austere hawk
#

Is there a placeholder about how long a player has been online since they joined and didn't leave?

silver minnow
austere hawk
#

Do you know if there is a variable that counts from 30 seconds to 1 second? I want to put something to tell you how much time the players have left before I remove them from the server if they don't log in?

crystal flume
#

hi

#

%vault_eco_top_rank% does not work for me

#

i've downloaded vault papi package

#

expansion i mean

#

and whilst some of the placeholders work swell

#

others don

#

don't

#

i have the newest vault 1.7.3 version

#

papi 2.10.9

#

too

crystal flume
#

%vault_eco_top_rank% shows as text

#

%vault_eco_top_balance_1% shows as 0.0

#

%vault_eco_top_player_1% comes empty

#

as in no text

#

my baltop is far from empty

#

and the top eco should be 1,535.25$

#

any ideas about the source of the problem?

#

if anybody has any solution or idea, please @ me

mild gale
crystal flume
#

In the holographic display

mild gale
crystal flume
#

I have them, Thats why some of the placeholders work i think

#

Its just these „top” ones dont display

crystal flume
mild gale
#

what is your server version

crystal flume
#

1.16.4

#

Is that a bad version?

crystal flume
austere hawk
#

Player placeholder, ping_color doesn't work for some reason. I see it in the PlaceholderAPI config, but colors don't work when using the %player_ping

rain roost
#

What's wrong with this?

#

In plugin.yml
softdepend: [PlaceholderAPI]

In onEnable:
if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null)
this.getServer().getPluginManager().registerEvents(new PlaceholderRegister(), this);

quiet gulch
#

you seem to be implementing a listener

#

in the same class

#

that sounds a bit dumb

#

i would separate them into separate classes

rain roost
#

But this line of code needs it:
this.getServer().getPluginManager().registerEvents(new PlaceholderRegister(), this);

quiet gulch
#

uhhh

#

i don't think so

rain roost
#

Because its registering events

quiet gulch
#

i dont think u need to register it tho

#

yeah i just checked one of my old projects

#

it doesnt need a listener

rain roost
#

Removing it doesnt fix it 😦

quiet gulch
#

uhhh

#

hm

rain roost
#

/papi parse me %xphill_kills%
Gives me:
%xphill_kills%

quiet gulch
#

?paste

tender vaporBOT
quiet gulch
rain roost
#

Yesir I copy pasted that

#

then edited upon it

quiet gulch
#

well idk then

#

oh wait!

#

thats the example for one that is a seperate jar file

rain roost
#

Oh

quiet gulch
#
@Override
    public String onPlaceholderRequest(Player player, String identifier){

}
#

this is the function u need

rain roost
#

@quiet gulch ty it works now

quiet gulch
#

np

rain roost
#

KDR is the issue, rest work fine

quiet gulch
rain roost
#

Nothing

#

Just the }

quiet gulch
#

oof

#

kdr is null

#
double kdr;
#

thats null

#

ya can't have it as null

#

@rain roost read ^

rain roost
#

@quiet gulch

kills = Main.data.getConfig().getInt("Players." + player.getUniqueId().toString() + ".TotalKills");```
This is the error line
#

It cant find kills/deaths

quiet gulch
#

well something there is null

#

i would, personally, split that line up into multiple lines, so u know exactly what is returning null

rain roost
#

Its kills thats returning null

#

& deaths

#

those 2 lines are giving null values

#

I think its because of the player

#

but idk how I would define player in this situation

elder stump
#

Hey
I need a bit help, so I want to create a javascript placeholder that returns the amount of players in AFK from essentials, how can I achieve that?

turbid tide
elder stump
#

Okay I will try that, thanks

wise goblet
#

Advice:
Make a list
Use the AfkStatusChangeEvent, add if afk, remove if not afk.

turbid tide
wise goblet
#

;-;, hey super, make a plugin instead

neon surge
#

Hey guys! My server onlinemode=false, players have nicknames that contain " _ " and similar characters. I made some commands through mycommand and other plugins. So, when trying to output any message, I get an error, for my own command I need to get data from mycommand using placeholder: %mycommand_playerdatafor_$arg1_name%, $arg1 is %player_name%, which the plugin gets when you click on the menu (DeluxeMenus). If a player with the nickname test executes the command, it will be executed correctly. If the player with the nickname te_st, then the command will not be executed, I understand why the command stops working - because the plugin receives the command in this way %mycommand_playerdatafor_te_st_name%, but how do I make it ignore this and execute the command as usual?

wise goblet
#

Since your server is cracked, just go disallow _ from ign's

neon surge
#

I have players on the server with " _ " and I don't want to lose them because of this

turbid tide
#

yeah but there isn't any other option I'm afraid. use their UUID instead of their name

silver minnow
#

I thought this server doesn't support pirating .-.

untold adder
#

hello, is a placeholder to see if player in online in a specific server, I tried with pinger but idk

turbid tide
untold adder
#

no I want to see if the player is already in that specific server, to show something like Already Connect to the Server

#

a specific player

turbid tide
#

ah not possible then. well not with the placeholders I know.

#

you probably need something custom

untold adder
#

ok thanks PlusOne

austere hawk
#

Why this?

marsh ridge
#

can i get the placeholder expansion

silver minnow
marsh ridge
#

its not downloading placeholder automatically

#

i aactully deleted the placeholders

#

now its not downloading

#

@silver minnow

#

can i get that ecloud

silver minnow
#

?

#

you can use ecloud to download via /papi ecloud download expansionname

marsh ridge
#

/papi ecloud download Bedwars1058 Not working

silver minnow
#

oh you don't need to download that

#

It'll work as long as you have the plugin

#

i think

marsh ridge
#

i actually deleted the folder of placeholder api

#

after that it stop working

silver minnow
#

Do you have the bedwars1058 plugin?

marsh ridge
#

ofc

silver minnow
#

do /papi parse me %bw1058_stats_deaths%

#

what appears?

marsh ridge
#

unknown command

silver minnow
#

um

#

Do /plugins and screenshot the list

tender vaporBOT
marsh ridge
#

i cant paste img here

tender vaporBOT
#

@marsh ridge,

silver minnow
#

-_-

silver minnow
#

um

#

Do you have the PlaceholderAPI plugin?

#

might want to install PAPI first

#

😐

marsh ridge
#

sorry man thanks

tender vaporBOT
earnest sky
#

t

elder stump
#

Hey,

I'm trying to make a javascript placeholder, but I'm stuck. How can I parse a placeholder as another player? E.g %essentials_afk%, I want to calculate an amount of players afking on the server, to do that I need to parse the placeholder to each player to see if they are afking or not.

turbid tide
elder stump
#

Cool and where is this documented?

opal rivet
#

anygood place holder api level plugins?

turbid tide
#

if you mean about the parseother expansion, its on the wiki with all the others

#

if you mean the method

#

that's all there is to it

#

PlaceholderAPI.static.setPlaceholders(player, string)

elder stump
#

I'm getting this error

tender vaporBOT
turbid tide
elder stump
tender vaporBOT
turbid tide
#

hmm that's weird

#

what's your server version and PlaceholderAPI version? @elder stump

#

because this code 100% works for me

elder stump
#

1.12.2 and 2.10.6

turbid tide
#

update to the development builds please and see if that works

#

?papi-builds

tender vaporBOT
elder stump
#

I can't as some of my plugins use the older version

#

but I can test it on my test server

#

to check if that's the problem

#

Tested on test server with latest dev jar, not working

turbid tide
#

what the hell. I'm using the exact same code you do and it works

elder stump
#

Okay, now it "works", I just needed to update the JavaScript expansion

#

the problem now is that it returns 0

#

which is an issue because players are actually in AFK

turbid tide
#

hmm

elder stump
#

but if I parse on a player that is actually in afk (I did it on myself) it returns the amount of active players on the server

turbid tide
#

what if you parse %essentials_afk% for an afk person?

elder stump
#

it returns yes

turbid tide
#

and what if you do it for a non AFK person?

elder stump
#

it returns no

turbid tide
#

ok let me recheck the code

mint swift
#

%bungee_<servername>% doesn't work for me

turbid tide
mint swift
#

yes

#

i did

#

it wil remain on 0 even if there is someone in the server

turbid tide
#

and are you sure you're using the correct server name?

mint swift
#

yes its the server name i gave in the bungeeplugin right?

turbid tide
#

in the bungee config.yml

#

so for example %bungee_lobby% for a server named lobby

#

its also case sensitive

#

so if you named it Lobby you have to use Lobby not lobby

mint swift
#

oke lemmie check

#

jo thnaks

#

it works didn't pay atantion to the letters

opal rivet
#

placeholder API for network levels?

turbid tide
#

its all on there.

opal rivet
#

is there like /papi ecloud ...

turbid tide
#

I mean you could ask that first... xD

#

no there is not.

#

it probably comes with the plugin directly

#

so there is no need for a download command

opal rivet
#

hmmm didnt seem to work

turbid tide
#

?startuplog

tender vaporBOT
turbid tide
opal rivet
#

didnt have any erros

turbid tide
#

u 100% sure?

opal rivet
#

errors

#

yeah

#

il figure it out

turbid tide
#

I mean you could just send it over just in case you missed it but if you don't want to... then id

#

idk*

opal rivet
#

ill try mdvwplaceholderapi

turbid tide
opal rivet
#

yeah it supports scoreboard revision

elder stump
#

Can you look into the script please?

opal rivet
#

is there a better levels plugin

turbid tide
elder stump
#

The problem must be var afk = PlaceholderAPI.static.setPlaceholders(onlinePlayers[i], "%essentials_afk%"); because if I ran the parse command on myself it returns 0 (because I'm not afk), but if I parse on a player that is afk it returns the amount of players online

#

so it doesn't check each player one by one

#

it only checks that single player

#

this is the issue, but I don't know what method solves that

turbid tide
#

I see hmm give me few minutes to think what could be done.

elder stump
#

Okay

steep thorn
#

@elder stump can you send the latest version of the script?

elder stump
#

This is the latest version

steep thorn
#

Easy fix is likely to change "%essentials_afk%" to "%" + "essentials_afk%"

#

Hacky AF but it will work

#

Because placeholderapi replaces all placeholders up front

turbid tide
#

oh I seee

steep thorn
#

And this prevents that

turbid tide
#

that makes a lot of sense

#

lmao

elder stump
#

checking

turbid tide
#

here you go this 100% works

#
var count = 0
var onlinePlayers = BukkitServer.getOnlinePlayers()
for (var i = 0; i < onlinePlayers.length; i++) {
    var player = onlinePlayers[i]
    if (PlaceholderAPI.static.setPlaceholders(player , "%essentials_afk" + "%") == "yes" ) count++
}
count.toFixed(0)```
#

just tested it

#

yeah I forgot about that and its not the first time it happens to me xD

#

I keep forgetting

elder stump
#

Why is this working like this?

turbid tide
#

because it was parsing the placeholder

#

for you

#

for the person the javacscript was parsed for

#

like it parses all strings first then it does the rest I guess

steep thorn
#

count += PlaceholderAPI.static.setPlaceholders(onlinePlayers[i], "%essentials_afk" + "%") == "yes";

#

😎

turbid tide
#

ugh but that returns a string. not a number.

elder stump
#

I still not understand the logic behind this, but cool because it works

turbid tide
#

oh wait

#

I'm dumb

#

xD

#

yeah that would work as well lmao

steep thorn
turbid tide
#

ah

#

I see edited

#

here even smaller js var count = 0 var onlinePlayers = BukkitServer.getOnlinePlayers() for (var i = 0; i < onlinePlayers.length; i++) { count += PlaceholderAPI.static.setPlaceholders(onlinePlayers[i], "%essentials_afk" + "%") == "yes" } count.toFixed(0)

elder stump
#

Thanks for helping out guys

jolly orchid
#

is there a way to subtract 2 placeholders inside of a string

#

I have a scoreboard where I want to put 'NPC Kills: %placeholder1% - %placeholder2%'

austere hawk
#

Hello blitz, I would like to create a script that removes the ftop value placeholder if the player has no ftop value.

turbid tide
turbid tide
#

expansion

#

%math_[precision:0]{placeholder1}-{placeholder2}%

jolly orchid
#

it shows player kills and total kills

#

didn't see a way to put in npc kills so i was just trying to subtract player kills from kills

turbid tide
#

well yeah math placeholder. and the other message was for Exotic

jolly orchid
#

oh

#

im blind, my b

dawn bloom
turbid tide
#

you'll have to download an older version

#

do /papi ecloud download Vault 1.6.0

warm topaz
#

it can be enabled in config

dawn bloom
#

It s impossible for me to use other version of vault coz i use 1.16

dawn bloom
warm topaz
#

papi config

untold perch
#

This is def a long shot but is there a way to have a placeholder check if you are whitelisted on another server?

EX
I parse the placeholder %whitelist_1.1.1.1:25566% on lobby. that ip is the game server ip. It would check if the player is whitelisted and if they are it would return yes and if not it returns no

dawn bloom
warm topaz
#

?

#
  vault:
    formatting:
      thousands: k
      trillions: T
      quadrillions: Q
      billions: B
      millions: M
    baltop:
      check_delay: 60
      cache_size: 100
      enabled: true```
the option is right there for me
#

placeholderapi config

#

enabled: true

warm topaz
dawn bloom
#

My bad, everything works)

warm topaz
#

👍

dawn bloom
#

but what about play time?

warm topaz
#

u would probably need a more advanced solution for that, such as the LeaderHeads plugin

dawn bloom
#

in essentials u can find with /whois how much he played

turbid tide
#

yeah but if you want a leaderboard you need LeaderHeads

#

Essentials doesn't have a leaderboard for playtime

dawn bloom
#

Yeah, i noticed

#

can I somehow limit the numbers after the point?(in baltop)

turbid tide
#

you can remove everything after point but that's all

#

don't think there is way to limit decimals

warm topaz
#

math?

dawn bloom
#

hahah, how i can remove then

warm topaz
#

js?

#

possibly formatter?

turbid tide
#

well I guess js.

#

but not directly from the top placeholders

#

%vault_eco_top_balance_fixed_#%

warm topaz
#

kek

dawn bloom
#

ty

split portal
#

Hello, I have a problem. I would like to set the number of players on the server on scoreboard, I put placeholder %server_online% but it doesn't work.
I have a PlaceholderAPI plugin for this. Please help!

warm topaz
#

if u do /papi parse me %server_online% what does it return?

split portal
#

It return %server_online%

#

@warm topaz Are you?

austere hawk
#

@eternal wedge

warm topaz
split portal
#

Thank you for help i go sleep but i try it after 😀

austere hawk
#

[PlaceholderAPI] expansion class SemperChatExpansion is outdated:
Failed to load due to a [NoClassDefFoundError], attempted to use ru/SemperAnte/Chat/SemperChatPlaceholders

Why can this happen?

wise goblet
#

Where did that expansion come from exactly?

eternal wedge
#

Could anyone give me a hand with a script. Please message me

wise goblet
eternal wedge
#

So I'm trying to write a script that changes the ftop value in chat from n/a to nothing. ( When a faction doesn't have any value it shows the faction ftop as n/a in chat and on featherboard) basically I don't know where or how to start

austere hawk
wise goblet
#

Send the jar to me ;-;

eternal wedge
#
%skript_ftopf::ftopaddon_faction_rank%
%skript_ftopf::player%
on placeholder request with prefix "ftopaddon_faction_rank":
  if the identifier is "n/a":
    if the player prefix is "n/a"
      set the result to " "
    else:
      set the result to "%ftopaddon_faction_rank%"
``` I know its wrong but could i get a hand on how to do it
austere hawk
#
    @Override
    public boolean canRegister(){
        return (semperchat = (SemperChatPlaceholders) Bukkit.getPluginManager().getPlugin(getRequiredPlugin())) != null;
    }

I don’t know why it didn’t work, I deleted it and it worked, maybe it was due to some kind of logic change in Paper 1.12.2
Since I don't need this check, everything is fine)

#

hm

#

no, it didn't work xD

#

@wise goblet sent to private messages jars

wise goblet
#

I will check on that later... Since I am not on my pc rn

austere hawk
#

😖

austere hawk
#

@wise goblet Sorry, I already understood what the problem is .. After a bunch of hours it came to light that in the plugin API I turned off the plugin in the config

rare lily
#

These might do the trick

#

The firstInit() function will always triggered once when you first evaluating the script

#

And the JSON getter

steep thorn
eternal wedge
#

im new to coding so please explain how to

eternal wedge
#

okay i read all that and understand var and functions now.

flint nacelle
rare lily
#

I'm not familiar with that expansion, but I think it's because somewhere in the argument that you're supposed to use a number

flint nacelle
flint nacelle
rare lily
tender vaporBOT
#

@rare lily,

rare lily
#

Shush

#

I keep forgetting about Barry

turbid tide
#

o

tawdry gyro
#

I have a Question when i try like /papi ecloud download Essentials it dosn Work

turbid tide
#

did you do /papi reload after?

tawdry gyro
#

Then it say No expansions found

turbid tide
#

oh

#

?Ecloudblock

tender vaporBOT
tawdry gyro
#

my mc server is on 1.16.4

turbid tide
#

^

tawdry gyro
#

Ty

remote oasis
#

Hello, so I have this plugin called Items Adder which allows you to use custom images in text, gui, signs, ... There is an integration for it to work with Placeholder API. I only recently discovered this but default players see %img_imagenamehere% instead of say the image of a heart emoji.

I can see all the placeholders with no issue. So this must be a permissions thing. Players also have custom image prefix so it's an actual image of PLAYER playername >> Hey guys This seems to work fine but when it comes to placeholders, they can't see them.

Using an image in chat is different than using it in a hologram, you'd use : heart : (no spaces) and it will show the image. But holograms like NPC's names require placeholder

turbid tide
#

to allow placeholders use

zenith bane
turbid tide
zenith bane
#

but it doesnt work

#
papi parse fuki21 %redprotect_player_used_blocks%
[16:36:24 INFO]: %redprotect_player_used_blocks%```
#

is this the correct page for report this kind of bug ?

remote oasis
#

I'm using an addon called Betterranks. The default emoji's that come with the plugin work but the ones i added don't, at least not in placeholders

turbid tide
#

and you're sure you've used it correctly? also you can set up permissions for each yourself

#

did you set them?

turbid tide
remote oasis
turbid tide
#

hmm I'm not really that experienced with IA. Used it a bit but not a lot. They do have a discord server tho where you can ask for help. because I'm not fully aware of how their stuff works.

remote oasis
#

I see

turbid tide
#

oh also

remote oasis
#

I was looking right at it hehe

#

I've tried everything

#

you could join to see if you spot anything

turbid tide
#

ain't got that much time rn.

remote oasis
#

all good

turbid tide
#

that's why I suggested going to their discord because I know IA is not that popular in here and I ain't got time to look into this anymore xD

remote oasis
#

Sure i'll try there

#

thanks anyways!

zenith bane
tender vaporBOT
#

@zenith bane,

turbid tide
#

?Startuplog

tender vaporBOT
turbid tide
#

this is how you get the startup log ^

zenith bane
turbid tide
#

just use paste bins

#

?paste

tender vaporBOT
turbid tide
#

like these ones ^

zenith bane
turbid tide
# zenith bane https://hastebin.com/ebuyikeruv.makefile

[RedProtect] PlaceHolderAPI found. Hooked and registered some chat placeholders. as you can see it hooked. so I guess you'll have to contact their support because its most likely a problem on their part. I can't see any other errors

tranquil sapphire
#

Anyone help me with this js? So I basically wanna make like money needed to rank up and it'll display how much you need to well, obviously rankup. So it'll minus your money from the price needed to rankup. But if they have the amount or more then it'll say /rankup

#

It'd obv need to be erm, js

vivid sparrow
#
function rankup() {
    if (args.length == 0) {
        return ""
    }
    
    let cost = parseInt(args[0]) || -1
  
    if (cost <= 0) {
        return "cost is <= than 0"
    }

    let balance = parseInt("%vault_eco_fixed%")

    if (balance >= cost) {
        return "You can rankup!"
    }

    return balance - cost
}

rankup()```
Try this @tranquil sapphire `%javascript_identifier_200%`
tranquil sapphire
#

Hold on. To double check. I put this in the js folder right

#

under wotever name and then use the placeholder to identify it?

#

using this placeholder? %javascript_identifier_200%

vivid sparrow
#

identifier is whatever name you gave it on javascripts config

tranquil sapphire
#

it's just returns nothing

#

I wanna use ezrankspro placeholders within it

turbid tide
#

what for?

#

like you use the placeholder in place of the 200

tranquil sapphire
#

Like

turbid tide
#

oh @vivid sparrow let is not a thing in nashorn

#

that's the problem

#

1 sec let me fix

tranquil sapphire
#

So it'd give you an exact amount that you need to rankup

turbid tide
#
function rankup() {
    if (args.length == 0) {
        return ""
    }
    
    var cost = parseInt(args[0]) || -1
  
    if (cost <= 0) {
        return "cost is <= than 0"
    }

    var balance = parseInt("%vault_eco_fixed%")

    if (balance >= cost) {
        return "You can rankup!"
    }

    return balance - cost
}

rankup()```
#

this is it

#

he used let instead of var

#

so basically you'll use it like this %javascript_identifier_{cost_placeholder}%

tranquil sapphire
#

Confused a little ngl.

#

I wanna use

turbid tide
#

not rly because you literally have nothing to worry about

#

just use the placeholder

tranquil sapphire
#

I wanna use %ezrankspro_cost% and the players balance to get the exact amount they need to rankup

turbid tide
#

ugh that's what the javascript does for you

#

just do %javascript_identifier_{ezrankspro_cost}%

vivid sparrow
#
function rankup() {    
    var cost = parseInt("%ezrankspro_cost%")
  
    if (cost <= 0) {
        return "cost is <= than 0"
    }

    var balance = parseInt("%vault_eco_fixed%")

    if (balance >= cost) {
        return "You can rankup!"
    }

    return cost - balance
}

rankup()```
#

there

turbid tide
#

and it will cacluate automatically

lavish sail
#

Anyone know why this placeholder does not work? The output is nothing...
%parseother_{iridiumskyblock_island_top_owner_1}_{iridiumskyblock_island_members}%The placeholder %iridiumskyblock_island_top_owner_1% does give a playername in its output 🙂

tranquil sapphire
#

Still is just blank

vivid sparrow
#

it should work, just tested it

turbid tide
#

show the placeholder that you're using

vivid sparrow
turbid tide
#

like what have you typed in scoreboard?

#

not you xD

#

bcz the code is fine

vivid sparrow
#

ik smh

#

didnt read your message

tranquil sapphire
turbid tide
#

ugh...

#

{placeholder.here}

#

rankup is not a placeholder

#

from PAPI

#

%javascript_identifier_{ezrankspro_cost}% I think this should work

vivid sparrow
#

arguments arent needed

turbid tide
#

oh wait

#

I just realised

#

xD

vivid sparrow
#

is just %javascript_scriptNameHere%

turbid tide
#

didn't read the full code you sent last

#

oh @tranquil sapphire ^

tranquil sapphire
#

Ok ill give it a whirl

turbid tide
#

oh also @vivid sparrow the vault placeholder

#

seemed of but had to check

#

it also has the balance word in it

vivid sparrow
#

true

turbid tide
#
function rankup() {    
    var cost = parseInt("%ezrankspro_cost%")
  
    if (cost <= 0) {
        return "cost is <= than 0"
    }

    var balance = parseInt("%vault_eco_balance_fixed%")

    if (balance >= cost) {
        return "You can rankup!"
    }

    return cost - balance
}

rankup()``` @tranquil sapphire
tranquil sapphire
turbid tide
#

what if you do /papi parse me %javascript_rankup% ?

tranquil sapphire
turbid tide
#

ok now /papi parse me %ezrankspro_cost%

tranquil sapphire
#

0

#

I am opped

#

/papi parse me %ezrankspro_cost% works on an alt

#

Gives the correct amount

turbid tide
#

ok and if you parse the javascript on the alt. does it return anything?

tranquil sapphire
#

nope

turbid tide
#

ok send a screenshot of how your javascript_placeholders.yml looks

#

and then a screenshot of how your rankup.js file looks

tranquil sapphire
#

javascript_placeholders.yml ???

#

oh

#

The file isn't there..

#

isnt so simple like

rankup:
file: rankup.js
engine: nashorn

turbid tide
#

where is that rankup.js located in?

tranquil sapphire
turbid tide
#

hmm I'm confused because it seems to work for me. of course I don't use the cost placeholder just a random number

rare lily
#

I only have 2 tasks on the to-do list of JS-Exp

turbid tide
#

o

rare lily
#

Which is editing wiki and find a way to support all users

turbid tide
#

and it all works? I mean what you've added so far

#

support all users?

#

what does that mean?

rare lily
#

Erm... don't mention that thonking

#

But the functionality, it's all gucci

#

I finished the debug

balmy moth
#

How to remove the How to remove the decimal in
papi ecloud download math?
like 1.000 -> 1

zenith bane
tender vaporBOT
#

@zenith bane,

low fiber
#

Hey, how do I retrieve values from a sql database and parse it into a placeholder?

sturdy sluice
#

I forgot the term for this, but is it possible to do this with parsing placeholders inside eachother?:%placeholder_{placeholder2_{placeholder3}}%

silver minnow
junior musk
#

it works if the expansion supports parsing placeholders within its own placeholders, yeah

#

for example, the %math_...% placeholder support placeholders with {} but %bungee_% doesn't

rustic wharf
#

Sombody knows which expansion this is %javascript_rewards-delay_OpenDelay_5% . Please tag me <

silver minnow
#

uh

vivid sparrow
#

Javascript

#

@rustic wharf

rustic wharf
tender vaporBOT
#

@rustic wharf,

dense trail
vivid sparrow
#

Last update was in 2017, is probably a typo

dense trail
#

Do u know a better extension for playtime

#

cause that one isn't working

vocal folio
#

what placeholder can asynchronously get the prefix of an offline player?

silver minnow
#

swear?

dense trail
#

Glare is playertime extension doesn't work

vivid sparrow
#

js expansion is not yet compatible with java 15

vocal folio
# silver minnow swear?

%parseother_{nickname}_{vault_prefix}%

Caused by: java.lang.RuntimeException: The operation to load user data for '87803417-1311-3f9b-b275-27fdb1e63a42' was cancelled by LuckPerms. This is NOT a bug.
The lookup request was made on the main server thread. It is not safe to execute a request to
load data for offline players from the database in this context.
If you are a plugin author, please consider making your request asynchronously.
Alternatively, server admins can disable this catch by setting 'vault-unsafe-lookups' to true
in the LP config, but should consider the consequences (lag) before doing so.
steep thorn
#

@vocal folio a placeholder can't be 'asynchronous', the API doesn't work with any kind of callbacks or promises

#

What I mean by this is that it all depends on who's calling the placeholder

#

So if your plugin fetches it from PlaceholderAPI on an async thread, it will be async

vocal folio
rare lily
#

Hi. Is there even a way to push wiki changes to JS-Exp though?

turbid tide
#

oh you ain't got access to edit it?

#

can't you do it thru PRs?

rare lily
#

There isn't a way to pr that though

#

But I can clone it

turbid tide
#

ah.

#

I mean if you want I can edit it. or you can ask funnycube to give you access

eternal wedge
#

function getRank() {
  if RANK !== " "{
    return RANK !== " " ? [${RANK}];
  }
}
getRank()
``` could anyone help with this?
turbid tide
#

are you trying to return [rank] if they have a rank and an empty string if they don't ?

eternal wedge
#

so when they dont have any ftop value to return an empty string, once they do have value for the [rank] to return at the start of the prefixes

turbid tide
#
var rank = "%ftopaddon_faction_rank%"
function getRank() {
  rank != "" ? "[" + rank + "]" : ""
}
getRank()``` this should do it then
turbid tide
balmy marten
#

Potentially

#

Let me look

turbid tide
#

its in the PlaceholderAPI wiki.

#

well org

#

or whatever that is

balmy marten
#

Invited

rare lily
#

Ok accepted

eternal wedge
#

Updated the script, although ftop in chat still doesnt update with the brackets once it has a value, is there anything i need to change on DeluxeChat for it to register?

#

Also messed around with a value but still to no luck

turbid tide
eternal wedge
#

Sure just give me a sec to install a screenshot software.

turbid tide
#

can you do without again but this time this: /papi parse me TEST%ftopaddon_faction_rank%TEST

eternal wedge
turbid tide
#

ah so its a space there I see

#

thought it was just an empty string

eternal wedge
#

ahh guess so

turbid tide
#

try this then js var rank = "%ftopaddon_faction_rank%" function getRank() { return rank == " " ? "" : "[" + rank + "]" } getRank()

#

also in my old script I forgot to add return xD

eternal wedge
#

ahh lol, didnt even pick up on that lol

turbid tide
#

are you sure you're using the javascript placeholder?

#

and not the ftopaddon one?

eternal wedge
#

not sure, but i believe so, my mate set all that stuff up and jut asked me to do the code

#

looking at it, looks like he used the ftopaddon placeholder

full kettle
#

anyone know of a way to print a number string of the number of players with x permission?

#

so close :(

#

would appreciate an @ if anyone figures this out <3

turbid tide
#

use this expansion ^

full kettle
#

ily

#

ilysm

#

no way this exists

#

this is incredible

eternal wedge
#

blitz had a look into the js placeholders for fac and stuff, and none of them seem to have a fac rank or anything

#

is there any way around this or alternatively we switch it up and not use factop instead some map points style thing

silver minnow
#

what is fac?

eternal wedge
#

faction

lean crystal
#

so can anyone help with the %Server_countdown% placeholder? I'm trying to get a countdown to 05:00 each day, but parsing %server_countdown_HH:mm_05:00% seems to just return 0. Is there a way to do this? I can get a countdown to a date to work fine, just not a time

#

this is probably a common one, but I cant seem to find an explanation of how it works fully to identify what im doing wrong

lean crystal
#

Can I get any help with this?

silver minnow
#

You can always request a custom plugin fingerguns

lean crystal
#

well, apparently this is a feature in the Server expansion

#

but there isnt an explanation of how to use it

silver minnow
#

ohh okay

#

I'm confused on what you're asking ;-;

#

wait

#

countdown for local time?

#

👀

lean crystal
#

effectively

#

but the only feature ive found that does this

#

is the one added in 2.2.2

#

but neither the issue, nor the github seems to explain how to "use placeholders inside of the placeholder"

silver minnow
#

What placeholders did you try already?

lean crystal
#

so the notes state you can use %server_time%

#

2 secs, ill grab the thing im working with

silver minnow
#

wut

#

oh

lean crystal
#

%server_countdown_dd.MM.yyyy.HH:mm:ss_{%server_time_dd.MM.yyyy%}.05:00:00%

#

fucking formatting

#

%server_countdown_dd.MM.yyyy.HH:mm:ss_{%server_time_dd.MM.yyyy%}.05:00:00%

#

so, in theory, i should be able to somehow include the placeholder in {}

silver minnow
#

does it support putting placeholders in placeholders?

lean crystal
#

according to the release notes for 2.2.2 and the issue

silver minnow
#

oh i see what you mean

lean crystal
#

but it doesnt explain how to get it to be included

#

yeah

silver minnow
#

hmm

lean crystal
#

yeah

#

ive no idea

#

tried {} () .. _ _

#

tried just using %%

#

none of them seem to work

silver minnow
#

If you can't find anything in a few days I recommend requesting a custom plugin though

#

I would do it (for free) but I don't have time 😐

#

maybe later if you can't find a solution

lean crystal
#

thanks, hopefully someone will know how to use a feature included in the expansion

silver minnow
#

🙂

austere hawk
#

Where are you displaying the info?

steep thorn
solid temple
#

Guys, am I using PlaceholderAPI correctly?

String huis = PlaceholderAPI.setPlaceholders(player, "§fБаланс§8:§e%JavaScript_money%§8§e%JavaScript_credits%");

Score money = obj.getScore(huis);```
#

?

dusk scarab
#

%server_ram_free% doesn't seem to work. it looks like a countdown from 5.3k to 2.7k that restarts back to 5.3k

novel moss
#

Ofc thats how garbage collectors work

lean crystal
dusk scarab
novel moss
#

Yep

dusk scarab
#

then i'm confused on what you meant, @novel moss. i don't know what garbage collectors are XD

low fiber
#

Anyone knows this error?

#

I can't seem to load mysql and player

#

only the Mysql folder gets generated

#

when i download it from /papi ecloud download

thick ginkgo
#

the factions MCore expansion isnt working... any ideas as to why?

rare lily
#

Do you have MassiveCore and Faction on your plugin list?

austere hawk
#

@thick ginkgo Given up on FX

thick ginkgo
#

i did.. but trying it again rn @austere hawk

#

/f and /f help still arent working

tender vaporBOT
austere hawk
#

@thick ginkgo Just ask for support.

#

They will help.

turbid tide
#

help with?

austere hawk
turbid tide
austere hawk
#

I dont remember

#

In fact, this is the case for almost all chatformat plugins, not just for deluxechat.

turbid tide
#

you bought the plugin over an hour ago? because if you did you were not found in the database

west pond
#

so i made a script to use with deluxchat

#

but for some reasons it doesnt work

turbid tide
west pond
#

will do gimme a sec

austere hawk
#

i have been trying many plugins and i used pirated plugin to try this @turbid tide z

#

i have the same problem with every plugin

brisk coral
#

Yikes

west pond
#

why do i have to verify if im asking for support with PAPI which is free?

brisk coral
#

You're using DeluxeChat, which isn't free

#

Just a precaution fingerguns

west pond
#

but my problem is has nothing to do with it

#

the jar is owned by my friend and not me 🤔

austere hawk
#

the problem is not deluxechat the problem is papi does not work in any format plugin, but it works with plugins for other purposes

west pond
#

the script doesn't work

#

never said its deluxechat xD

tender vaporBOT
#

🔨 It has come to my attention that a user was using a leaked plugin, they have been... well let's say.. dealt with.

west pond
#

YML ```
factionChat:
file: factionChat.js
engine: nashorn


js:
```js
function chat() {
var faction = '%factionsuuid_faction_name%'

    if (faction.length != 0)
        return '%rel_factionsuuid_relation_color%%factionsuuid_player_role%%factionsuuid_faction_name% &8&l⎹';
    else return ''
}
chat();```

https://solos.only-fans.club/g8XHOawb
turbid tide
#

let

#

is not working in js expansion

brisk coral
#

var

turbid tide
#

it uses the nashorn engine

#

use var instead

west pond
#

oh

#

same problem

#

help, please?

turbid tide
#

1 sec

west pond
#

okay

turbid tide
#

what's your JavaScript Expansion version?

west pond
#

i just downloaded it so i believe its the latest

turbid tide
#

try this then js function chat() { var faction = '%factionsuuid_faction_name%' return faction == "" ? "" : "%rel_factionsuuid_relation_color%%factionsuuid_player_role%%factionsuuid_faction_name% &8&l⎹" } chat()

west pond
#

but that's literally the same? ill try it anyways

#

didnt workhttps://solos.only-fans.club/38QP7RZC

#

can it be that '%factionsuuid_faction_name%' returns a color code even if the player is not in a faction

#

its not, replaced the script with js function chat() { var faction = '%factionsuuid_faction_name%' return "Test" return faction == "" ? "" : "%rel_factionsuuid_relation_color%%factionsuuid_player_role%%factionsuuid_faction_name% &8&l⎹" } chat()

to test and it didn't return anything

rare lily
#

I think that's not gonna work...

west pond
#

what won't work 🤔

rare lily
#
function chat() {
  var faction = '%factionsuuid_faction_name%'
  return faction == "" ? "" : "%rel_factionsuuid_relation_color%%factionsuuid_player_role%%factionsuuid_faction_name% &8&l⎹"
}
chat()```
west pond
rare lily
#

Any errors on console?

west pond
#

ooop shouldve prob checked that earlier

#
[14:47:00 INFO]: [PlaceholderAPI] Successfully registered expansion: luckperms
[14:47:00 INFO]: [PlaceholderAPI] Successfully registered expansion: vault
[14:47:00 ERROR]: [PlaceholderAPI] Failed to init placeholder expansion from class: com.extendedclip.papi.expansion.factions.MCoreFactionsExpansion
[14:47:00 ERROR]: [PlaceholderAPI] com/massivecraft/factions/RelationParticipator
[14:47:00 INFO]: [PlaceholderAPI] Successfully registered expansion: player
[14:47:00 WARN]: [PAPI] [Javascript-Expansion] File: example.js for Javascript placeholder: example is empty
[14:47:00 INFO]: [PAPI] [Javascript-Expansion] 0 script loaded!
[14:47:00 INFO]: [PlaceholderAPI] Successfully registered expansion: javascript
[14:47:01 INFO]: ***fdhfgh <Pedolo> asd
[14:47:02 INFO]: Pedolo issued server command: /papi parse me %javascript_factionchat% | %factionsuuid_faction_name%
[14:47:54 INFO]: Pedolo issued server command: /version PlaceholderAPI
#

wait i think im dumb

#

yea fixed it

#

thanks alot ❤️

limber ice
#

I just updated Papi and it still crashes /papi ecloud list if I have my expansion installed, is it my expansion?

lean crystal
#

Still not sure if anyone's answered, but how are you supposed to use other placeholders inside the %server_countdown% from the Server expansion, as per 2.2.2?

mint fable
#

what do you mean by that?

#

this? %server_countdown_<SimpleDateFormat>_<ActualDateAndTimeBasedOnSDFSpecified>%

#

Also, why are you on 2.2.2 when the latest is 2.4.0?

storm sorrel
#

Good evening, I have a problem with the placeholders, when I install the placeholder Player, it works fine but all the others don't work ...

limber ice
#

@storm sorrel if you have the latest Papi make sure your expansions are up to date

storm sorrel
#

I have the last papi but precisely when I do / papi ecloud download Vault I have all the versions of Vault that appear except the one I use

mint fable
#

huh?

#

can you send a picture

#

=imgur

tender vaporBOT
near sentinel
#

Any other options other then pinger placerholder, as can't really use it on my network

storm sorrel
mint fable
#

I think that's kind of the only one

#

@storm sorrel are you using the latest vault?

storm sorrel
#

yes

mint fable
#

then just type /papi ecloud download vault

#

and press enter

#

you don't need a version, that's the EXPANSION version not the PLUGIN version

#

if you don't put a version it downloads the latest

#

I suggest downloading the latest for all expansions if you're on the latest version

storm sorrel
#

I am using the latest version of my plugins but when I download an extension with the command, the expansion does not work (even in the download version), in fact it is as if there is no expansion in the file while they are there

mint fable
#

download them manually

#

?ecloudblock

tender vaporBOT
mint fable
#

that should work

#

in fact it is as if there is no expansion in the file while they are there

#

are you saying there IS a file, but it's acting like there isn't?

storm sorrel
#

What I meant is that the expansions get downloaded to the "expansions" folder but don't work, even when downloading them manually ^^ '

mint fable
#

and you reloaded right?

limber ice
#

make sure you don't have multi of the same expansion, just slightly different names

mint fable
#

^ only have one of each

storm sorrel
#

Yes, i reloaded but not work

mint fable
#

/papi dump

limber ice
#

what does /papi dump do?

mint fable
#

you'll see

#

=paste

tender vaporBOT
storm sorrel
mint fable
#

did you just paste a paste link

storm sorrel
#

it seems functional again, thanks to you!

mint fable
#

👍

limber ice
#

I'm running dev-122 and things seem to work but when I reload papi the e cloud list stop working

mint fable
#

hmm, might be an issue for github?

limber ice
#

everything works fine on fresh boot of server

#

only break ecloud list when I have the Statz expansion

lean crystal
# mint fable what do you mean by that?

release 2.2.2 added a feature where you can apparently pass the %server_time% placeholder into the countdown one, to create a local countdown to like 6AM each day, but I cant find exactly how you pass the server time to the countdown

tender vaporBOT
#

@lean crystal,

lean crystal
#

So in theory, I would set the countdown datetime format to dd.MM.yyyy.HH:mm:ss then pass it %server_time_dd.MM.yyyy%.06:00:00%

turbid tide
#

{server_time_dd.MM.yyyy}

#

not %%

#

if you use it in the countdown one

lean crystal
#

damn, its curly braces without percentages

turbid tide
#

yep

lean crystal
#

like one of the only bloody combinations I didnt try

#

tyvm

turbid tide
#

ye most placeholders in placeholders work like that

#

since PAPI offers a method for it so its easy to implement

lean crystal
#

I thought it was something like that, but was just missing the part where % isnt needed

#

thanks

#

a ton

#

thought I was going mad

turbid tide
#

👍

lean crystal
#

Okay, so that is now parsing, which is a big step, but its being parsed as 0

#

%server_countdown_dd.MM.yyyy.HH:mm:ss_{server_time_dd.MM.yyyy}.05:00:00%

turbid tide
#

what's the time for you rn?

lean crystal
#

when the server date time is 11/01/2021 18:25:30

turbid tide
#

or what's the server time

#

ye because it has passed

lean crystal
#

im an idiot

#

sorry

turbid tide
#

this doesn't calcualte for the next day

lean crystal
#

2 hours of sleep

#

how can I point it do the next day on from current date?

#

if that is possible

turbid tide
#

hmm that's a good question.

#

I would recommend you make a javascript for that because I don't think you can do placeholder in placeholder in placeholder

lean crystal
#

hmmm, okay

turbid tide
lean crystal
#

ty

turbid tide
#

I'll make the placeholder for you

lean crystal
#

oh, thanks!

turbid tide
#

hmm now that I think about it its going to be a bit more complicated xD

lean crystal
#

its never straightforward

turbid tide
#

the problem is if I just add 1 to day it will just break when its last day I guess.

#

last day in month I mean

lean crystal
#

ahh right, for the months, yeah

turbid tide
#

wait I can just use day of the year instead

lean crystal
#

I'm going to pretend to understand what you mean and agree

turbid tide
#

ugh day of year so 1-365

lean crystal
#

riight

turbid tide
#

until then make a javascript file and all that stuff

lean crystal
#

shall do

turbid tide
#

Placeholder to use now: %server_countdown_DD.yyyy.HH:mm:ss_{javascript_time}.05:00:00%, Code to use: ```js
function time() {
var day = parseInt("%server_time_DD%")+1
var year = "%server_time_yyyy%"
if (day+1 > 365) day = 1
return day + "." + year
}
time()

lean crystal
#

you're a lifesaver, shall try it now

turbid tide
#

btw change {javascript_time} to your {javascript_identifier} so basically whatever you named the javascript, change time to that

lean crystal
#

yeah

#

getting an invalid date

turbid tide
#

can you parse just the javascript? /papi parse me %javascript_identifier%

lean crystal
#

12.%server_time_yyyy

#

oh

turbid tide
#

oh

#

I see my bad

lean crystal
#

i think there's a % missing

turbid tide
#

yep

lean crystal
#

Okay

#

parses correctly, gives 12.2021

#

okay

#

that whole placeholder parses fine

#

but shows as "invalid date" in TAB

#

looks like a TAB problem then

#

tyvm though

turbid tide
#

ugh don't think its a TAB problem

lean crystal
#

oh?

turbid tide
#

do /papi parse me %server_countdown_DD.yyyy.HH:mm:ss_{javascript_time}.05:00:00%,

lean crystal
#

that parses fine

#

gives me a countdown

#

which is why I think its TAB

turbid tide
#

ah

#

thought the error is from the placeholder

lean crystal
#

well, where the placeholder is in the TAB config, it just says "invalid date"

#

but when parsing with /papi parse, the countdown works fine

#

so thats what shows on TAB

#

'&5Server restarts in &f%server_countdown_DD.yyyy.HH:mm:ss_{javascript_time}.05:00:00%' line in the config

turbid tide
#

ye no idea then.

lean crystal
#

I cant see anything wrong with the placeholder

turbid tide
#

if it parses fine in /papi parse

lean crystal
#

yeah, ill take it up with the TAB lads

turbid tide
#

I don't know why it would error in tab tho as well

lean crystal
#

not a clue

#

unless its having problems accessing the javascript expansion for some reason?

turbid tide
#

try this in TAB: '&5Server restarts in &f%server_countdown_DD.yyyy.HH:mm:ss_13.2021.05:00:00%'

#

see if this works