#placeholder-api

1 messages · Page 136 of 1

turbid tide
#

for that

#

and ProtocolLib

fast rampart
#

oh

turbid tide
#

EssChat does not support PAPI unfortunately

fast rampart
#

owell

#

ill just cry and use the other one

turbid tide
#

use another Chat Formatter lmao xD

#

EzChat for example is a good one

fast rampart
#

i cant

turbid tide
#

why not?

fast rampart
#

not my choice

stone parcel
#

@anypapideveloper

keen crown
#

A plugin which would be able to scrape a text from the server and be able to convert it into a placeholder. For example, a anticheat may have a linear message such as 'player has failed check (type) vl', you would be able to scrape the line by using regex and taking the info where set.
:P add me on discord if you wanna know more :P Etherised#3532

vivid sparrow
jaunty zephyr
#

Is there a way to see the placeholders for other players on my server?

vivid sparrow
#

papi parse me|name %placeholder%

turbid tide
#

or if you want to use it somewhere else use the ParseOther expansion

jaunty zephyr
#

ty!

steep thorn
#

Yes

tender vaporBOT
#

@steep thorn,

Hey!

Please respect the rules, be patient and don't ping staff members!

turbid tide
#

Ye I just kinda forgot and someone seems to have unpinned the message.

sick mauve
#

Still, how do I use this placeholder? Please write an example!

%gradient_percent_{#hex1}_{#hex2}_{percentage:0..100}%

rare lily
#

Idk about this, should I just push version update to 1.7.0 for a new supported scripting engine for JS-Expansion? Cause with my latest current OpenJDK, I can't develop with Nashorn anymore

austere hawk
#
Hi, I need help please.

luckperms' %luckperms_group_expiry_time_<insert>% placeholder shows wrong value/date.

How to reproduce:
1.Download luckperms' latest release (LuckPerms 5.2.35)
2.Download PAPI's latest release (PlaceholderAPI 2.10.9)
3.Run /papi ecloud download LuckPerms
4.Run /papi reload
5.Run /lp user <username> parent addtemp default 30d
6.Run /lp user <username> info (it will show the correct date and time)
7.Run /papi parse me %luckperms_group_expiry_time_default%
The output will show incorrect date.

Is there a fix for this already? Can anyone help me?
vivid sparrow
#

@austere hawk contact luckperms dev.

austere hawk
#

They said I should use dev build of placeholder and it worked. lol

austere hawk
#

Hello we are trying to use PlaceHolder API on our Paper 1.16.4 server it seems it does not support yet is there any way or maybe a dev build available for it?

brisk coral
#

It's already supported

#

And works just fine

austere hawk
#

Paper 1.16.4?

brisk coral
#

Yup

austere hawk
#

Maybe we mest something up.

#

Alright thanks.

brisk coral
#

Make sure you have the correct expansion for the placeholder you're trying to use installed

austere hawk
#

I'll go double check because we already tested that.

limber scroll
mental night
#

Are you using the bungee placeholderapi expansion?

#

with the math expansion

limber scroll
#

yes

mental night
#

Just to double check you have the math expansion installed

#

and have HolographicExtensions installed too

limber scroll
#

It works when It's shorter, it doesn't work when I add too much

mental night
#

mhm

#

make the bungee names shorter ;p

visual agate
#

Can someone help me validate placeholders?

#

im using leaderheads and papi

silver minnow
visual agate
#

for leaderheads

silver minnow
#

um I never used leaderheads.. but you can use /papi parse me %placeholder_here% to test placeholders

visual agate
#

ok ill try

silver minnow
#

sorry if I'm way off, I don't get what you mean by validating

visual agate
#

its for leaderheads you need to validate the placeholder

#

When i use /papi parse me %statistic_player_kills%
it out puts 1

silver minnow
#

okay

visual agate
#

yup I got it now thank you so much for your help!

silver minnow
#

np 🙂

lavish sail
#

for the placeholder statistic_mine_block:<material> what should i type for material for diamond ore and emerald ore?

novel moss
#

DIAMOND_ORE and EMERALD_ORE

proud tide
#

I can't get the Statistic Expansion to work

#

it gives blank responses for playtimes

#

@ me when responding pls

turbid tide
#

What's your server version and your Statistic Expansion version?

proud tide
#

1.16.4

turbid tide
#

oh

proud tide
#

2.0.0

#

for statistic

turbid tide
#

make sure you're on latest Statistic and also

#

use the dev build for PAPI

#

not the release

proud tide
#

okok

#

let me test

#

Still happening

turbid tide
#

you fully restarted the server after using the PAPI 2.10.10-111 ?

proud tide
#

yep

turbid tide
#

what placeholder is showing that?

#

is not working*

#

lmao remove it please @proud tide

proud tide
#

/papi parse Agaloth %statistic_time_played%

turbid tide
#

showcase is meant for showcasing projects

proud tide
#

oh

turbid tide
#

?imgur

tender vaporBOT
#
FAQ Answer:

You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/ to upload images/screenshots.

turbid tide
#

if you want to post images here ^

proud tide
#

this happens

#

when using %statistic_time_played%

#

or any other time statistic

turbid tide
#

that's very strange

#

I'm on 1.16.4, latest statistic, latest papi dev, and it works fine

proud tide
#

hmm what could cause it

turbid tide
#

I rly don't know to be honest

proud tide
#

the other placeholders such %statistic_damage_dealt% gives numbers

#

but only time placeholders gives a "void" response

#

Plugins (115): AdvancedEnchantments, AirBar, Aliases, ArmorStandTools, BannerBoard, BattlePass, BlockLocker, BlockParticles, BuycraftX, CS-CoreLib, CarbonChat, ChatReaction, ChestShop, ChestShop-towny, ChestTerminal, Chunky, ChunkyBorder, Citizens, CitizensCMD, ClearLag, ColoredAnvils, CombatLogX, CommandRegions, CustomCrafting, DeathMessagesPrime, DeluxeCommands, DeluxeJoin, DeluxeMenus, DeluxeSellwands, DeluxeTags, DiscordSRV, Dynmap-Towny, Elevator, Essentials, EssentialsSpawn, GSit, GappleOptions, Gatekeeper, GodsEye, GoldenCrates, Graves, Harbor, HeadDatabase, HolographicDisplays, HolographicPlaceholders, IllegalStack, ImageRenderer, InventoryRollback, ItemsAdder, JakesRTP, Jobs, KiteBoard, LeaderHeadsRevamped, LightAPI, LimitPillagers, LiteBans, LoneLibs, Lottery, LuckPerms, MVdWPlaceholderAPI, MessageAnnouncer, MineableSpawners, MobArena, Multiverse-Core, Multiverse-Inventories, Multiverse-Portals, NexEngine, NightVision, NotTooExpensive, OldCombatMechanics, OpenInv, PacketListenerApi, PlaceholderAPI, Plan, PlayerKits, PlayerVaults, PlayerWarps, Prism, ProCosmetics, ProtocolLib, ServerListPlus, ServerUtils, ShopGUIPlus, ShopGUIPlusMineableSpawnersBridge, Slimefun, SpeedyPaths, SuperVanish, TAB, TheNewEconomy, TitleManager, TokenManager, Towny, TownyChat, TownyFlight, TownyNameUpdater, TreasureChest, UltimateTimber, Vault, Vehicles, ViaBackwards, ViaVersion, VoidGenerator, VoteParty, Votifier, VotingPlugin, WildStacker, WolfyUtilities, WorldBorder, WorldEdit, WorldGuard, XLTournaments, dynmap, mcMMO, spark and zAuctionHouseV2

#

idk if that can be the cause

turbid tide
#

you got any plugin that works with player play time?

proud tide
#

I did before

turbid tide
#

I can't go thru 100+ plugins lmao. I'm going to go crazy

proud tide
#

I deleted them because it wasn't updating numbers anymore

#

after 1.16.4

#

I'm on 1.16.4 purpur however

turbid tide
#

It might be Purpur as well. Idk.

#

I use PaperSpigot

proud tide
#

I missed 35 updates

#

let me update it

odd jay
#

Hello!
How do I use the math expression to add 2 variables together? Could I have an example please?

turbid tide
#

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

dusky merlin
#

Placeholders Autorank do not works in 1.16.4 ?

#
[02:49:21 INFO]: Panda_Barbe issued server command: /papi ecloud download AutoRank
[02:49:21 INFO]: [PlaceholderAPI] Fetching available expansion information...
[02:49:21 WARN]: [PlaceholderAPI] failed to download expansion information
java.util.concurrent.CompletionException: java.lang.NullPointerException
        at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314) ~[?:?]
        at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319) ~[?:?]
        at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:645) ~[?:?]
        at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:479) ~[?:?]
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) ~[?:?]
        at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020) ~[?:?]
        at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656) ~[?:?]
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594) ~[?:?]
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177) ~[?:?]
Caused by: java.lang.NullPointerException
        at me.clip.placeholderapi.expansion.manager.CloudExpansionManager.lambda$null$7(CloudExpansionManager.java:199) ~[?:?]
        at java.util.HashMap.forEach(HashMap.java:1336) ~[?:?]
        at me.clip.placeholderapi.expansion.manager.CloudExpansionManager.lambda$fetch$8(CloudExpansionManager.java:192) ~[?:?]
        at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:642) ~[?:?]
        ... 6 more
warm pollen
#

/papi parse me %player_y% shows " %player_y%"

#

as well as any placeholder

#

i have latest version

#

its not working at all

#

please help

coral jolt
#

Does somebody know a fix? latest spigot and bungee

tender vaporBOT
#
📋 Your paste, craftsman96
https://paste.helpch.at/atuwayocoj

A member of staff has requested I move your message to a paste,
Most likely beacause it contains a config/error/code snippet.

acoustic fractal
#

what is wrong with this:

#

%math_[precision:0]{luckperms_expiry_time_essentials.fly}+500%

#

i tried this aswell: %math_[precision:0]{luckperms_inherited_expiry_time_essentials.fly}+500%s but it dosent work

proud tide
#

statistic doesn't work at all on my server

#

even after deaths it counts as 0

#

and time based placeholders in statistic gives a null result

mental night
#

try using the dev build of it

steep thorn
#

What does it show

acoustic fractal
#

What i found out is that the luckperms placeholder Also says the seconds and minutes. So i cant use that placeholder

#

I got some help from luckperms so everything is sorted

proud tide
mental night
#

mhm, make a github issue on it is what i would do

#

unless it’s already an issue regarding it on there

proud tide
#

Apparently no one has this issue

#

I tried without plugins (same issue)

#

changing my server jar to paper 1.16.4 (same issue)

#

tried reinstalling the statistic expansion (same issue)

#

updating papi (same issue)

#

using a dev build of papi (same issue)

mental night
#

strange

proud tide
#

I have announceadvancements disabled

#

does that change anything?

#

in spigot.yml:

  disable-saving: true
  disabled:
  - minecraft:story/disabled```
#

oh wait

#
  disable-saving: true
  forced-stats: {}```
#

let me test it

#

nooooo

#

that was actually the issue

rotund pendant
#

How come when I parse a placeholder with /papi parse me ..... I get a different out put from when I parse through a javascript placeholder? (/papi parse me %javascript_.....)


For example;

var timeTill = "%essentials_kit_time_until_available_" + args[0] + "%";

function ee() {
    if(timeTill == 0) {
        return "now";
    }
    else if(timeTill == "no") {
        return timeTill;
    }
    else {

        formattedMsg = "&c" + timeTill.replace("h", " Hour(s)").replace("m", " Minute(s)").replace("s", "Second(s)")
        return formattedMsg;

    }
}
ee();

when I do %javascript_kittime_clerk% I get "no", but when I parse normally I get "0"

junior musk
#

try if(timeTill == "0")

#

oh wait

#

I know

rotund pendant
#

what's the issue?

junior musk
#

var timeTill = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%essentials_kit_time_until_available_" + args[0] + "%");

rotund pendant
#

Thanks

#

works

junior musk
#

👍

rotund pendant
#

Umm... I'm not sure if that's working. @junior musk

junior musk
#

?

rotund pendant
#

When I parse through the JS, it returns "no" but if I parse normally I get a cooldown IE: "23h ...."

#
//var timeTill = "%essentials_kit_time_until_available_" + args[0] + "%";
var timeTill = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%essentials_kit_time_until_available_" + args[0] + "%");

function ee() {
    if(timeTill == 0) {
        return "now";
    }
    else if(timeTill == "no") {
        return timeTill;
    }
    else {

        formattedMsg = "&c" + timeTill.replace("h", " Hour(s)").replace("m", " Minute(s)").replace("s", "Second(s)")
        return formattedMsg;

    }
}
ee();

@junior musk Current script btw

junior musk
#

so...

#

the scripts returns no

rotund pendant
#

yeah

junior musk
#

while it should return the formatted msg ?

rotund pendant
#

yeah

#

the "else" statement

junior musk
#
var timeTill = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%essentials_kit_time_until_available_" + args[0] + "%");

function ee() {
    BukkitPlayer.sendMessage(timeTill+arg[0]);
    if(timeTill == 0) {
        return "now";
    }
    else if(timeTill == "no") {
        return timeTill;
    }
    else {

        formattedMsg = "&c" + timeTill.replace("h", " Hour(s)").replace("m", " Minute(s)").replace("s", "Second(s)")
        return formattedMsg;

    }
}
ee();
#

parse the placeholder and tell me what it tells you in the chat

rotund pendant
#

x2 "no"

junior musk
#

what's the placeholder you used?

rotund pendant
#

%javascript_kittime_clerk%

#

it's called kittime btw

junior musk
#

try to copy again (I edited the msg)

rotund pendant
#

"noclerk"

#

you had a typo in the code btw, which I fixed

junior musk
#

where?

mental night
rotund pendant
#

+arg[0]

#

@junior musk

junior musk
#

oh

#

:D

mental night
#

😅

junior musk
#

and /papi parse me %javascript_kittime_clerk% returns the right value?

rotund pendant
#

the wrong value

junior musk
#

I meant the Essentials placeholder 😅

rotund pendant
#

yeah

junior musk
#

what if you try that

function ee() {
    var timeTill = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%essentials_kit_time_until_available_" + args[0] + "%");
    BukkitPlayer.sendMessage(timeTill+arg[0]);
    if(timeTill == 0) {
        return "now";
    }
    else if(timeTill == "no") {
        return timeTill;
    }
    else {

        formattedMsg = "&c" + timeTill.replace("h", " Hour(s)").replace("m", " Minute(s)").replace("s", "Second(s)")
        return formattedMsg;

    }
}
ee();
austere hawk
#

what is the placeholder for essentials balance and luckperms rank _

junior musk
#

%vault_eco_balance%
and %vault_rank%

#

and make sure to execute /papi ecloud download Vault
and /papi reload first

rotund pendant
#

"noclerk" @junior musk

junior musk
#

then idk =/

#

actually

#

yeah nah not sure about this one

#
function ee() {
    var timeTill = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%essentials_kit_time_until_available_${args[0]}%");
    BukkitPlayer.sendMessage(timeTill+"${args[0]}");
    if(timeTill == 0) {
        return "now";
    }
    else if(timeTill == "no") {
        return timeTill;
    }
    else {

        formattedMsg = "&c" + timeTill.replace("h", " Hour(s)").replace("m", " Minute(s)").replace("s", "Second(s)")
        return formattedMsg;

    }
}
ee();
turbid tide
#

oh lmao what the hell is this? PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%essentials_kit_time_until_available_${args[0]}%");

#

oh yeah you used $ didn't see that

#

lmao

#

you tried js PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%essentials_kit_time_until_available_{" + args[0] + "}%"); or is that not what the problem is?

junior musk
#

we tried but without the {} around

mental night
#

@rotund pendant

kind field
tender vaporBOT
#
FAQ Answer:

Should your host not allow connections to the PlaceholderAPI eCloud, you can manually download expansion from https://placeholderapi.com/ecloud and place them in your /plugins/PlaceholderAPI/expansions/ folder.

kind field
#

It looks like the problem with ecloud half of the plugins broken 😦

turbid tide
#

the problem is not rly with the ecloud. The ecloud seems to be working

#

so your host provider probably blocked connection to most things

#

you'll have to do as the bot said

#

and go to placeholderapi.com/ecloud and download the expansions from there

hasty prawn
#

I want to display the users server ping on my scoreboard, do i need to download the pinger placeholder for it to work?

turbid tide
#

no

#

its the Player expansion

#

and use %player_ping% I think

hasty prawn
#

oh alright

#

no worky

turbid tide
#

1 second then

#

let me see what the actual placeholder was

#

yes it is that

#

can you do /papi ecloud download Player and /papi reload?

#

@hasty prawn ^

hasty prawn
#

Thanks!

turbid tide
#

👍

rare wave
#

I need help. The essentials placeholder that shows when the kit become available again, doesn't show days

rare wave
#

PlaceholderAPI-2.10.10-DEV-111

mild gale
#

I mean what placeholder

rare wave
#

essentials

mild gale
#

bruh

rare wave
#

%essentials_kit_time_until_available_<kitname>%

#

kitname replaced with the kit name

mild gale
#

%essentials_kit_time_until_available_<kitname>%

rare wave
#

yes

#

I use that

#

it doesn't show days

mild gale
#

what are you trying to do?

#

gui?

rare wave
#

My VIP kit is available 1 time in 30 days, I have a kit menu and I want it to show when it'll be available when a player put their mouse on the vip item

#

but the placeholder doesn't show days

#

it goes 23h 15m 15s

#

instead of 29d 23h 15m 15s

mild gale
#

in your essentials config kit what delay time did you put?

rare wave
#

30 days for VIP kit

mild gale
#

no

#

in Essentials config KIT

rare wave
#

in essentials

mild gale
#
    delay: 345600``` Like this
#

what number did you put in your kit.yml

rare wave
#

delay: 2592000

#

which is 30 days

rare wave
#

HELLO>?

hasty prawn
#

I'm trying to display multiple things in one score, after a certain time. I've gotten it to work with just text, but what about placeholders?

# Default time in ticks for a score to stay on the scoreboard (20 ticks = 1 second)
UpdateTime: 60

# Save which players have the scoreboard disabled
SaveScoreboards: true

# Configure your scoreboards layout
Scoreboards:
  example:
    Titles:
      - "&5&lD B A"
    Scores:
      13:
        - "&7&m------------------"
      12:
        - "&7» &5&lPlayer"
      11:
        - "    &7%player%"
      10:
        - ""
      9:
        - "&7» &5&lBlocks Mined"
        - "&7» &5&lHours Played"
      8:
        - "    &7%statistic_mine_block%"
        - "    &7%statistic_hours_played%"
#

i got it to work for score # 9

#

but for the placeholders they dont want to work on score 8

#

the statistic is installed, and works, but im not sure how to get it to work for switching after the update time of 60

#

this is using simplescore plugin btw

steep thorn
#

@hasty prawn what is happening exactly? You said 'dont want to work', but this doesn't tell us what happens exactly

hasty prawn
#

when i say it doesn't want to work, i mean i'll save it and reload, and the scoreboard just doesnt show up

#

thats when trying to animate the placeholders

#
  • "&7» &5&lBlocks Mined"
    - "&7» &5&lHours Played"
    these ones work fine
#
  • " &7%statistic_mine_block%"
    - " &7%statistic_hours_played%"
    but these ones dont
steep thorn
#

So no scoreboard at all when using these?

hasty prawn
#

yes

steep thorn
#

You'll have to check your logs

#

There will be an error there most likely

hasty prawn
#

i've tried adding a time variable but that doesnt work either

steep thorn
#

?startuplog

tender vaporBOT
#
FAQ Answer:

Startup Log Location
Your latest startup log can be found in the logs folder of your
server directory, labeled as latest.log.
Please copy the contents and paste them to a paste service.
Type ?paste for more information.

hasty prawn
#

alright, thanks, i'll check it out and get back to you later

#

im going to sleep, it's almost 4am

steep thorn
#

Go to sleep my man

austere hawk
#

i am using saber factions (fuuid fork) and how to remove that gap

#

@brisk coral

tender vaporBOT
#

@austere hawk,

Hey!

Please respect the rules, be patient and don't ping staff members!

brisk coral
#

Why are you pinging me?

austere hawk
#

any support wasn't looking at me, sorry for ping

brisk coral
#

Wait till someone is available, and has time to help you

#

Or knows the answer to your question

austere hawk
#

okay sorry

misty cradle
#

Hi! How can I make placed blocks scoreboard with placeholder?

misty cradle
#

with statz

mild gale
#

What is this even mean?
%jobsr_user_quests% - Returns the user current available quests from jobs separated with comma ,

junior musk
#

It returns all the quests the player currently has

#

in the format Quest1, Quest2, Quest3

mild gale
#

sorry I'm dumb. That's why I'm asking xd

junior musk
#

no

#

just use it %jobsr_user_quests%

mild gale
junior musk
#

what does it do?

mild gale
junior musk
#

do you have Jobs Reborn?

mild gale
#

yes

junior musk
#

do you have PlaceholderAPI?

mild gale
#

yes

junior musk
#

does jobsr show up in /papi list?

mild gale
#

yes

junior musk
#

then it's not a valid placeholder

mild gale
#

oof thanks 😄

misty cradle
#

Hi! How can I make placed blocks scoreboard with placeholder?

steep thorn
#

@misty cradle I don't think there's a plugin that has that specific feature built-in

#

Besides a certain leaderboard plugin

vivid sparrow
#

*insert LH ad here*

warm topaz
austere hawk
#

HELP

#

HGELP

#

sry

versed warren
#

really

silver minnow
#

wait he left

#

wut

merry wagon
#

Is there a way to have %statistic_mine_block:<material>% count every single block mined?

turbid tide
#

its lower in the list. Those first placeholders are if you want specific items, mobs etc. then the full amount placeholders are lower on the list

merry wagon
#

Oh alright. Thank you 👍

turbid tide
#

👍

peak echo
#

Is there a placeholder that returns the amount of [item] in your entire inventory? I tried looking for it, but I dont know where to start searching.

turbid tide
#

Don't think there is an existing one I'm afraid

merry wagon
#

Is there any plugin/way to make a leaderboard for placeholders?

turbid tide
#

LeaderHeads

peak echo
#

Too bad then. I wanted to allow people to sell all of 1 item in their inventory at once. Right now only have the ability to sell 1 and sell 64

turbid tide
#

its paid but its the best at what it does MRHumanTarget

turbid tide
#

not all items?

#

then you can use the CheckItem expansion

peak echo
#

No just check for 1 type of item, which you can set your own

turbid tide
#

yep then checkitem expansion

peak echo
#

so that would be %checkitem_amount_nameequals:(item name here)%?

turbid tide
#

no

#

%checkitem_amount_mat:MaterialName%

peak echo
#

oooh i see it now

turbid tide
#

name will check the dispaly name so if someone rename a stone into "diamond"

peak echo
#

Ye okay

turbid tide
#

it will say like they would have a diamond

#

while they have a stone

peak echo
#

👍

hasty prawn
#

Why is my placeholder not working?

turbid tide
#

which one?

hasty prawn
#
  • " &7%statz_blocks_broken%"
#

i did download it

#

with papi ecloud

#

and reloaded

turbid tide
#

You got the expansion and the Statz plugin installed?

hasty prawn
#

statz plugin, that i need to install to the plugins folder?

turbid tide
#

yes

#

the expansion doesn't work without the plugin

#

but why use Statz?

#

just use Statistic

hasty prawn
#

it's not working as wanted, which i also dont know why, other than a plugin adding block values

#

because

#

it counts dirt as 2 blocks

turbid tide
#

oh

hasty prawn
#

or grass block as 2

turbid tide
#

what server version you on?

hasty prawn
#

i just want it to count 1

#

latest

turbid tide
#

on 1.16.4?

hasty prawn
#

mhm

turbid tide
#

and you have the latest Statistic expansion?

hasty prawn
#

downloaded and uploaded into my plugins folder?

#

for server plugins

#

?

turbid tide
#

/papi ecloud download Statistic and /papi reload

#

do this

#

and it will automatically

#

download the latest

hasty prawn
#

yeah it works, but it still seems to have block values or something, because grass block counts as 2

#

and for example stone counts as 1

turbid tide
#

hmm idk

#

then

hasty prawn
#

alright, so if i wanted to try and use statz

#

i need to download the statz plugin and upload it into my servers plugins folder?

#

on top of using papi to install it

#

??

turbid tide
#

yes

#

PAPI doesn't have that data

#

The Statz expansion takes the data

#

from the Statz plugin

hasty prawn
#

ahhhh

turbid tide
#

PAPI is just an API.

#

that gets data from other plugins and gives it to other plugins and stuff

hasty prawn
#

makes sense

turbid tide
#

not even the statistic one

#

and the others that need no plugin

#

those are taken from minecraft

hasty prawn
#

mhm

#

alright, i'll try that now

#

Yes it works now, and it counts 1 by 1, thanks @turbid tide

turbid tide
#

👍

hasty prawn
#

also, how do i animate the placeholders? I can do it with the texts, but not the placeholders for some reason

turbid tide
#

what are you using to animate them?

hasty prawn
#

well the scoreboard plugin im using is simplescore

#

lemme get the 'code'

#
        - "&7» &5&lBlocks Mined"
        - "&7» &5&lHours Played"
      8:
        - "    &7%statz_blocks_broken%"
      7:
        - ""
      6:
        - "&7» &5&lPing"
      5:
        - "    &7%player_ping%"
#

score 9: works just fine

turbid tide
#

ok and what doesn't work then?

hasty prawn
#

but if i added another placeholder under the statz broken one

#

it wont switch between them

turbid tide
#

``

#
      8:
        - "    &7%statz_blocks_broken%"
        - "Testing"```
#

try this

#

and see if it changes between them

hasty prawn
#

nope doesnt work, the scoreboard just doesnt show up then

#

i've tried using things like - time or just time but to no avail

turbid tide
#

hmm

hasty prawn
#

at the top of the config, theres this

#
UpdateTime: 60
#

maybe i need to use updatetime as a variable between them?

#

idk

turbid tide
#

don't think so

hasty prawn
#

me neither

#

in the vid the kid uses time, but that also was just for text

#

not using a placeholder

#

im saying that correctly right?

#
  • " &7%statz_blocks_broken%"
#

would be a placeholder?

turbid tide
#

yes

hasty prawn
#

alright

#

im bamboozled

turbid tide
#

believe me I am as well

#

lmao

hasty prawn
#

lol

#

nobodys ever done that before? i mean probably so with another plugin or coded, but idk

nimble lava
#

how i can use %world_time_<world>%

steep thorn
#

@nimble lava fill in a world?

nimble lava
#

yeah but if i do %world_time_myworld% or %world_time_<myworld>% nothing happens

#

@steep thorn

steep thorn
#

Define 'nothing happens'

#

Is it empty?

mild gale
nimble lava
#

im sure

#

I have a scoreboard that is comtieble with papi and when I write one of them in is just this text

steep thorn
#

Parse it with '/papi parse' and show the output

#

Because it's hard to understand what you're saying

nimble lava
#

i mean %world_time_<myworld>% is just a normal text

steep thorn
#

Do you have the necessary expansion installed?

nimble lava
#

no

steep thorn
#

Then why even bother trying?

#

First item of the FAQ

nimble lava
#

I did everything like this
but %world_time_myworld% is the correct placeholder?
so it should work like that?

steep thorn
#

Show output of '/papi dump'

nimble lava
steep thorn
#

Seems like the world expansion is not registered

#

Send your startup log please

nimble lava
#

from the Console?

steep thorn
#

What?

#

Just latest.log after you restart the server

nimble lava
steep thorn
#

Seems like it's not loading because you don't have Vault installed

nimble lava
#

so /papi ecloud download Vault?

steep thorn
#

No

#

The plugin Vault

nimble lava
#

okay

#

it worked thanks

glass sigil
#

Hi! So, I'm working on a server in which I have to put Skript variables in a scoreboard using PlaceholderAPI. I installed the addon through ecloud and try to reload. It throws an error:
*[PlaceholderAPI] skript is attempting to register placeholders via a PlaceholderHook class which is no longer supported! *

turbid tide
#

The Skript expansion is outdated

#

I know there's a more updated one but idk where to get it from

#

its on someone's github

stoic wagon
#

There is a way to make your custom PlaceholderAPI requests async?

merry sluice
#

what is wrong with my papi? Anything i try to add an expansion it says failed to find expansion with name: x

#

also /papi ecloud list says i have no expansions

steep thorn
stoic wagon
steep thorn
#

Because the replacements happen on the same thread as the function that calls it

rotund pendant
#

so the javascript expansion allows for arguments using _, what if I want to use another placeholder as a argument - what would the %javascript_PLACEHOLDER....% look like?

#

@ me

junior musk
#

%javascript_<placeholder>_<arg0>,<arg1>,<arg2>,...%

#

@rotund pendant

rotund pendant
#

Ok.

tawdry apex
#

Hello 🙂
I have a quick question, you will probably answer me! 🙂
I still have these orange lines on the console.
Thanks 🙂

[PlaceholderAPI] Loaded class net.milkbowl.vault.economy.Economy from Vault v1.7.3-b${env.TRAVIS_BUILD_NUMBER} which is not a depend, softdepend or loadbefore of this plugin. [PlaceholderAPI] Loaded class net.luckperms.api.LuckPerms from LuckPerms v5.2.49 which is not a depend, softdepend or loadbefore of this plugin. [PlaceholderAPI] listplayers is attempting to register placeholders via a PlaceholderHook class which is no longer supported!

junior musk
#

the first two are just warnings which you can ignore, they aren't dangerous

#

the last one says that the ListPlayers expansion isn't compatible with the latest PAPI version

tawdry apex
#

@junior musk Thank you for your feedback, but I don't have "ListPlayer" installed in PAPI: /

junior musk
#

check your Expansions folder in your PlaceholderAPI folder

tawdry apex
#

I just installed "Player" for %Player%

junior musk
#

you should have a jar file name expansion-listplayers or something like that

#

remove it and reload PAPI

tawdry apex
#

Oh yes! I had not updated the FTP

junior musk
#

then the warning won't show

#

okay 👍

tawdry apex
#

I do not have any error 🙂 thanks @junior musk
And also I wanted to point out that I had installed the latest "Build" version of PAPI (2.10.10 DEV - 111) and it's cool, but it shows that the plugin is not up to date and it needs to be update to 2.10.9 (earlier version)

junior musk
#

that's probably because the updater doesn't find the update on Spigot and thus says it's outdated, but it doesn't really matter, you cna ignore it

#

there may be a config option in PAPI's config to disable the update msg

turbid tide
#

yes that's why

#

its a bit anyoing but I think you can disable it

#

from config.yml

#

I never looked tho xD

tawdry apex
#

I suspect but it is displayed in the Minecraft chat, is it better to use 2.10.10 or 2.10.9?

junior musk
#

checn_updates: in config.yml

junior musk
turbid tide
#

2.10.10 if you're on 1.16.4

#

also it fixed the %server_uptime% placeholder

#

so a few bug fixes on 2.10.10

tawdry apex
#

anyway, we are notified when there is a new update on discord?

junior musk
#

I'm using 2.10.9 in 1.16.4 and it works fine blobthinkingeyes

tawdry apex
#

I also saw a bad ping calculation with% player_ping% on the TAB, it displays admit-have, 400ms, bah PAPI will display 4400ms, but it's random, because small pings like 20ms don't bug

thick drift
#

whats the placeholder for players online on a diffrent server?

turbid tide
#

use the pinger_players one

thick drift
#

Okay

#

doesnt work

#

what the other one

#

cant remeber what it was

turbid tide
#

oh yeah

#

my bad

#

forgot about that

#

lmao

thick drift
#

haha

turbid tide
#

not sure if you can do whitelisted but online and offline can be done using the PINGER expansion

#

the bungee expansion is just for players amount

austere hawk
#

hi

#

A question if I put the mvdw expansion is the mvdw variable expansion?

turbid tide
#

I don't think they made it OS actually

austere hawk
#

he does not want to load the expansion

#

I downloaded it I put daddy reload and nothing

#

papi reload

turbid tide
#

Isaac its a joke xD

#

Papi = daddy in spanish

#

:))

austere hawk
#

yes

#

🙂

turbid tide
#

and they made it into an actual command

#

Ye can't find the expansion on Clip's github

#

Try maybe contacting him

austere hawk
#

Bueno, si descargo la expansión y nada

#

if I downloaded it through the console and manual pro github and nothing

#

?

twin sluice
turbid tide
#

the ultimatestatistics Expansion is missing the getAuthor() method

twin sluice
#

ok

twin sluice
#

Can someone help me? I have this script ```var haspermission = "%prison_prisoner_prestige_prefix";

function permission() {

if (haspermission === "N/A") {
return "";
}

}
permission();``` And I want to make that whatever else comes out of the placeholder that is not N/A stays as it is! How can I do it? Else?

pale estuary
#

Hi, Pinger extension does not work when I set Firewall (port blocking outside Bungee server). How to fix it?

gleaming charm
#

@twin sluice use an else statement

turbid tide
#
var hasPermission = "%prison_prisoner_prestige_prefix";
function permission() {  
   return hasPermission === "N/A" ? "" : hasPermision 
}
permission();```
#

@twin sluice

#

if you didn't figure it out

turbid tide
turbid tide
#

Oh rly?

#

how so?

pale estuary
#

You need to unblock connections from local IP.

turbid tide
#

Oh nah for me its a different story

#

I don't block connections

pale estuary
#

If you have IP "1.2.3.4" you need to set this IP in iptables, because 127.0.0.1 is not work xd

turbid tide
#

I have a VPN or whatever its called

#

it goes thru a different IP at first, blocks all non player connections then connects players to my server

#

There are a few things I still have to try maybe it will work I just didn't worry about it

pale estuary
#

xD

turbid tide
#

:))

twin sluice
tender vaporBOT
#

@twin sluice,

Hey!

Please respect the rules, be patient and don't ping staff members!

turbid tide
#

oh

#

hasPermision change it to hasPermis**s**ion

#

after return

#
var hasPermission = "%prison_prisoner_prestige_prefix";
function permission() {  
   return hasPermission === "N/A" ? "" : hasPermission 
}
permission();```
twin sluice
#
function permission() {  
   return hasPermis**s**ion === "N/A" ? "" : hasPermision 
}
permission();```
#

ok

turbid tide
#

I'm a bad explanation guy

#

so I did it for you

#

just take what I gave you

#

forgot an s

twin sluice
#

ok

#
        ReferenceError: "hasPermision" is not defined in <eval> at line number 3``` still!
silver minnow
#

does %player_displayname% include the vault prefix?

turbid tide
#

no @twin sluice take my code. The one I gave above the one you sent

#

don't use yours because you didn't understand what I meant

twin crater
turbid tide
#

ye they do

twin crater
#

And no this return the player display name

turbid tide
#

unless you use a plugin like essentials and you enabled it

#

don't think the display name will include ranks or stuff

twin crater
#

Mhm

turbid tide
#

just their "nickname"

silver minnow
#

time to open up filezilla and look at a preexisting server

#

hmm

#

I think it does

#

tho

#

ye

#

some plugin is making the prefix in the displayname

turbid tide
#

ye

#

Essentials

#

that's what I said

#

its an option you can disable

#

I'm pretty sure

#

add-suffix-prefix or whatever its called @silver minnow

silver minnow
#

OH

#

THANK YOU

#

barry disagrees

#

nevermind

#

that's disabled by default

#

so that can't be the issue

#

😦

turbid tide
#

its enabled by default actually.

#

you probably disabled it

silver minnow
#

oh

#

REALLY?

#

THANK YOU

#

bad barry

#

baaad

turbid tide
#

REALLY?
THANK YOU
you're welcome lmao

silver minnow
#

wait a second

#
# Disable this if you have any other plugin, that modifies the displayname of a user.
change-displayname: true

# When this option is enabled, the (tab) player list will be updated with the displayname.
# The value of change-displayname (above) has to be true.
#change-playerlist: true

# When EssentialsChat.jar isn't used, force essentials to add the prefix and suffix from permission plugins to displayname.
# This setting is ignored if EssentialsChat.jar is used, and defaults to 'true'.
# The value of change-displayname (above) has to be true.
# Do not edit this setting unless you know what you are doing!
#add-prefix-suffix: false

# When this option is enabled, player prefixes will be shown in the playerlist.
# This feature only works for Minecraft version 1.8 and higher.
# This value of change-playerlist has to be true
#add-prefix-in-playerlist: true

# When this option is enabled, player suffixes will be shown in the playerlist.
# This feature only works for Minecraft version 1.8 and higher. 
# This value of change-playerlist has to be true
#add-suffix-in-playerlist: true
#

im confused

#

what do I uncomment?

turbid tide
#

#add-prefix-suffix: false

#

that's only thing you uncomment

silver minnow
#

k thxthxthx

silver minnow
turbid tide
#

hmm idk what that does

#

ohhh

#

that will stop essentials from even

#

use setDisplayName I think

#

so you can

silver minnow
#

idkkkkkk

#

all I'm trying to do

#

with my plugin

#

is to have the prefix and all and also change player name color

#

😦

wooden canyon
#

Hello, I wanted to ask if there is no extension of the 'Multi world Money' plugin, I want to show a scoreboard of the money in each world but I did not find any extension in eCloud.

silver minnow
#

expansion* i think

wooden canyon
#

sorry, I'm using a translator 😅

silver minnow
#

okay

wooden canyon
#

is there any expansion of the 'Multi world money' plugin ?

silver minnow
#

using Vault?

wooden canyon
#

yes

silver minnow
wooden canyon
#

but I need him to get the money from a respective world, the % vault_eco_balance_commas% gives me the money that I have in the world I am in.

silver minnow
#

um

#

Vault is multiworld

wooden canyon
#

what I'm looking for is something like MWM_balance_<world> but the plugin does not have an expansion in placeholderapi

silver minnow
#

mwm?

#

oh

#

I thought you were using vault

wooden canyon
#

multi world money *

silver minnow
#

This?

wooden canyon
#

yess

silver minnow
#

oh

#

sorry i dont know :C

wooden canyon
#

and there is no way to create the expansion?

silver minnow
#

There probably is

#

I'm not 100% sure though

#

nope

#

unless

#

someone looks into the source code

#

because it doesn't have an API documentation

#

It's open source though

wooden canyon
#

I will find some way to do it, thank you very much!

scarlet valve
#

Hi is their a placeholder that shows you the time?

#

Lik
09/12/2020
19:44

silver minnow
#

🙂

#

I'm busy right now so I can't look 😦

scarlet valve
#

Ok ty

silver minnow
#

Try looking in like Server or something

#

idk

scarlet valve
#

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

silver minnow
#

ooo

scarlet valve
#

Found them

silver minnow
#

are you talking about irl time?

scarlet valve
#

Yes

silver minnow
#

oh

#

then that prob will work

scarlet valve
#

TY tho

silver minnow
#

np 🙂

stiff salmon
#

What is %vault_group%
?

junior musk
#

a placeholder that shows the group you currently have in your permissions plugin

stiff salmon
#

Does it work with Pex? I have Pex installed.

junior musk
#

yes

#

if you have Vault aswell it should work

stiff salmon
#

I have Vault installed and its just showing me this

silver minnow
#

Do /papi ecloud download Vault

stiff salmon
#

oh god

#

hell ye

#

thxs

cunning elk
#

Whats an expansion that has hoverable text ?

vivid sparrow
#

none?

turbid tide
#

ye none

junior musk
#

idk if there's one but be aware that if it's possible, it won't work everywhere (only in Chat and I think in books)

cunning elk
#

any open source plugin?

#

let me switch to dev

warm plover
stiff salmon
#

Does placeholder api not work with EzRanksPro?

rare wave
#

Why was my problem ignored?

steep thorn
steep thorn
meager nymph
#

Never say never

rare wave
#

My VIP kit is available 1 time in 30 days, I have a kit menu and I want it to show when it'll be available when a player put their mouse on the vip item
but the placeholder doesn't show days
it goes 23h 15m 15s
instead of 29d 23h 15m 15s

meager nymph
#

What placeholder are you using ?

rare wave
#

Essentials

meager nymph
#

server version ?

#

Yea iknow essentials

#

but what placeholder

rare wave
#

1 .16 2 Spigot

#

%essentials_kit_time_untilavailable<kitname>%

meager nymph
#

%essentials_kit_time_until_available_<kitname>%

#

this is the placeholder

rare wave
#

Yes

meager nymph
#

so %essentials_kit_time_until_available_vip%

rare wave
#

Yes

#

It doesn't show days

steep thorn
#

@rare wave can you verify with /papi parse?

turbid tide
#

IDK if I've recommended this before but have you made sure you're using latest Dev Build of PAPI, latest release of essentials and latest version of Essentials Expansion/'

steep thorn
#

To make sure it's not because of another plugin cutting off the first part

rare wave
#

Yes, it's the DEV version

#

To i just run /papi parse?

meager nymph
#

Lord do this /papi parse me %essentials_kit_time_until_available_vip%

rare wave
#

One moment

#

it says 0

turbid tide
#

that mins the kit is available

#

so take the kit

#

and then try again

rare wave
#

its not

#

25 days 22 hours and 55 minutes

#

It worked with 24 hours kit, when it goes to days, it stops working and displays 0

turbid tide
#

oh

#

one second

#

can you paste your PlaceholderAPI config,yml ?

#

?paste

tender vaporBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use one of these:
(However we do prefer if you used our paste :))
HelpChat Paste - Usage
Hastebin

rare wave
turbid tide
#

well its not what I thought it might b

#

be*

neat jacinth
#

blitz

#

the sound doesn't work for me

odd jay
#

Hello!
Can someone please help me make a Javascript placeholder to divide %statistic_player_kills% by %statistic_deaths%, and get the result rounded at 2 decimals in case it have?

vivid sparrow
#

%math_{statistic_player_kills}/{statistic_deaths}[precision:2]% try this

odd jay
#

Sure!

#

Thanks in advance

vivid sparrow
#

hopefully it wont error if you try to divide by 0 xD

odd jay
#

Lol, it works perfect, thx dude ❤️

turbid tide
#

it won't

#

it will just not work Gaby

#

I'm pretty sure

steep thorn
#

It will return NaN I think

#

Although I'm not sure if the 'precision' thing will mess it up

warm topaz
#

math expansion probably has something in place when dividing by 0 id hope

rare wave
#

So how do I fix the issue?

stone edge
#

if its not displaying correctly, then it must be an error with that plugin, not papi

delicate lotus
#

TÜRKİSH

DeluxeMenus menü yaptım kitler için. Sonra her perme özel izin yaptım örneğin:
type: string equals ignorecase
input: '%essentials_kit_is_available_overking%'
output: 'yes'
perme sahipse "yes" sahip değilse "no " yazıyor. bunu nerede değiştirebilirim

ENGLİSH

I made the DeluxeMenus menu for the kits. Then I made a special permit for each perm, for example:
type: string equals ignorecase
input: '% essentials_kit_is_available_overking%'
output: 'yes'
It says "yes" if it has perm, otherwise "no". where can i change this

meager nymph
#

output

rare wave
#

It displays everything expat days

#

hours, minutes and seconds are correct

odd jay
#

Hi again!

var placeholder = "%player_ping_<name>%";

function ping() {
   if (placeholder >= 0 && placeholder < 150)
       return "&a" + placeholder;
   if (placeholder >= 150 && placeholder < 300)
       return "&2" + placeholder;
   if (placeholder >= 300 && placeholder < 600)
       return "&c" + placeholder;
   else {
       return "&4" + placeholder;
   }
}
ping();
```How can I make it to replace "<name>" to the argument that defines on `%javascript_ping_<name>%` when parsing?
wet basinBOT
#

@idle sonnet Unknown expansion.

steep thorn
steep thorn
#

According to this it should support days

odd jay
#

Yes

#

timeutil shows days, hours, minutes and seconds.
example: 15d 20h 53m 23s

#

But I think that though essentials uses TimeUtil, it changes the way how displays on chat. LuckPerms is an example of a plugin that uses TimeUtil raw for its expiry placeholders.

rare wave
#

So how do I fix the issue?

odd jay
#

So I need to know how to replace "<name>" with the first argument of the javascript placeholder.

var placeholder = "%player_ping_<name>%";
```Does someone has any idea?
junior musk
#

PlaceholderAPI.static.setPlaceholders(BukkitServer.getPlayer("playername"), "%placeholder%")

#

@odd jay

#

and replace "playername" by the player name

odd jay
#

Hey Gab! Long time no see xd

junior musk
#

if the name is in the arg, then use args[0]

#

hey 👋

odd jay
#

Uh sorry where should I exactly put that?

var placeholder = "%player_ping_<name>%";

function ping() {
   if (placeholder >= 0 && placeholder < 150)
       return "&a" + placeholder;
   if (placeholder >= 150 && placeholder < 300)
       return "&2" + placeholder;
   if (placeholder >= 300 && placeholder < 600)
       return "&c" + placeholder;
   else {
       return "&4" + placeholder;
   }
}
ping();
junior musk
#

instead of the placeholder in the var

#

first line

odd jay
#

between quotes?

junior musk
#

no, it's a method, not a string 🙃

odd jay
#

Alright xD

#

%placeholder% should be replaced by %player_ping_playername% right?

junior musk
#

no NotLikeThis

#

just %playrr_ping%

#

the other one isn't a valid placeholder

odd jay
#

aaaaa I get it now

#

lets test how it goes lol

junior musk
#

||blobthinkingeyes||

stiff salmon
#

Does the placeholder ecloud downloads reset each time?
I had installed like 4 the other day and when I turn on my server again, my deluxechat was all placeholders.

trim mist
#

No

#

It downloads files to your folder so unless you deleted the folder, then, no.

odd jay
odd jay
#
var playername = args[0];
var placeholder = PlaceholderAPI.static.setPlaceholders(BukkitServer.getPlayer("playername"), "%player_ping%");

function ping() {
   if (placeholder >= 0 && placeholder < 150)
       return "&a" + placeholder;
   if (placeholder >= 150 && placeholder < 300)
       return "&2" + placeholder;
   if (placeholder >= 300 && placeholder < 600)
       return "&c" + placeholder;
   else {
       return "&4" + placeholder;
   }
}
ping();
steep thorn
#

Well, you don't need the double-quotes for the getPlayer call

#

Because "playername" with quotes is just a constant

odd jay
#

You are right on that one

#

gonna test, brb

steep thorn
#

But I think the point that was brought up already is why are you using an additional argument?

odd jay
#

thanks in advance for intending to help Robin!

steep thorn
#

So why %player_ping_<name>% instead of just %player_ping%?

odd jay
#

I think when %player_ping% parses for someone offline doesn't give any value

#

and the first one returns "0" which I can change to "Offline" Like I did on the JS

#

it returns 0 for when it parses on a player that is offline

steep thorn
#

You can do that even without the additional arg

#

If you used %player_name%, which also works for offline players

odd jay
#

Oh it returns empty right?=

#

so instead of "0" I replace it to "Offline" for when it is ""

#

I guess

steep thorn
#

Well if you want that specifically, check %player_online%

#

Not sure what it returns, but probably something you can use (a boolean)

odd jay
#

Yeah, thats right. I'm gonna first try to remove quotes

#

I removed the quotes, now it is parsing but for me, I'm trying to figure out why

#

May it be caused by the "getPlayer"?

#

The javascript is named "ping"

#

So when I parse the placeholder for myself, with %javascript_ping_Notch% it keeps returning my ping

#

Notch as example)

#

Is there a way to replace this -> BukkitServer.getPlayer(playername) to the args[0]?

odd jay
junior musk
#

replace playername

#

exactly as I told you before

odd jay
#

args[0]?

#

The way you told before didn't work :((

junior musk
#

which way?

#

I mean, what did you use?

odd jay
#
var placeholder = PlaceholderAPI.static.setPlaceholders(BukkitServer.getPlayer(args[0]), "%player_ping%");

function ping() {
   if (placeholder >= 0 && placeholder < 150)
       return "&a" + placeholder;
   if (placeholder >= 150 && placeholder < 300)
       return "&2" + placeholder;
   if (placeholder >= 300 && placeholder < 600)
       return "&c" + placeholder;
   else {
       return "&4" + placeholder;
   }
}
ping();
```It is like this right now, I changed `playername` to `args[0]` and remove the playername variable. And now it parses, but only for me, when I put another name as the argument 0 of the javascript, it will keep telling my ping.
junior musk
#

PlaceholderAPI.static.setPlaceholders(BukkitServer.getPlayer(args[0]), "%player_ping%")

odd jay
#

argd?

junior musk
#

args*

odd jay
#

I don't see any differences actually

junior musk
#

what placeholder did you use

#

ingame

odd jay
#

I did /papi parse me %javascript_ping_random% (random being an online player on my server) and it returns my ping, not hims

junior musk
#

is it his real MC name or simply a nickname?

odd jay
#

if I do /papi parse random %javascript_ping_Tomi010817% it will always give "random"'s ping

#

All real names.

junior musk
#

what ping does it give?

odd jay
#

The user I test with, usually goes at 75ms. I am going always in 200ms or around that

#

so when I parse for myself the javascript placeholder but specifying someone elses name, it will still display my ping

#

Oh wait

junior musk
odd jay
#

I'm a bit sleepy (haven't slept yet) but I think I can get to know the error

#

not an error

#

how the placeholder handles itself

#

%player_ping% will always return you ping on your view, even if you parse it as other player on chat I guess

junior musk
#

maybe you have to put the var line inside the function?

odd jay
#

I guess that the only way will by using %player_ping_<name>%

junior musk
#

since you're parsing it for the other player in the script

odd jay
#

Yes thats logically right

#

But I'm trying to make suppositions about what is happening with that weird placeholder lol

#

Wait

#
var kitName = args[0];
var placeholder = "essentials_has_kit_" + kitname;
var hasKit = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "%" + placeholder + "%");

function hasKit(){
  if(hasKit == "yes"){
    return "&aTrue";
  }
  return "&cFalse";
}

hasKit();
```this was an interesting sample I saw on the wiki page
#

I could do something like "%player_ping_ + alts[0] + %

#

right?

steep thorn
#

Can't you just trick it by doing "%player"+"_ping%"?

odd jay
#

That sounds reasonable

#

I will try

vivid sparrow
#

tf is player_ping_<name>

junior musk
#

not sure about that as I think it didn't for me in the past when using the setPlaceholders method but may be true

odd jay
#

Placeholder for seeing others ping

vivid sparrow
#

What's wrong with parseother ?

steep thorn
#

AFAIK the Javascript placeholder thing preprocesses the entire .js file before it is ran, that's why %player_ping% is replaced prematurely

steep thorn
odd jay
steep thorn
#

But I find it weird that you would use the player name as argument

odd jay
#

Oh yea

#

robin is right

#

Lol

#

I added colors for the ping

vivid sparrow
#

Is ping_name even a thing?

odd jay
#

%player_ping_<name>%

#

yes it is

vivid sparrow
#

Ok

steep thorn
#

Just ask yourself 'should players be able to see other player's ping'

#

If the answer is no, you don't need the argument thing

#

Regardless of that you could still use parseother as Gaby said

odd jay
#

@steep thorn

#

}

#

you fixed it

#

gosh

#

finally

steep thorn
#

With my hacky suggestion?

odd jay
#

it was what you said, about parsing before the script ran

#

yes lol

vivid sparrow
#

200iq Robin strikes again

steep thorn
odd jay
#

I'm surprised lol

#

thanks a lot to both of you ❤️

steep thorn
#

No problem

#

This was actually quite similar to a CTF challenge I had recently

#

Where there was a blacklist for certain words in a python script

#

And you had to concatenate the characters to bypass that

odd jay
#

I'm still surprised on how you managed to figure that out

odd jay
#

Hey! So how could I replace the value for the placeholder when it is null?

#

I thought I could replace it with "", but didn't work, it breaks the JS

steep thorn
#

@odd jay can you show what you've tried?

whole temple
#

Hoi there. Does anyone know a placeholder for your unique#? As in your join #. As in you were player number #n

warm topaz
#

u would probably have to store that data in a js placeholder (or a full expansion), of which i dont know about

whole temple
#

True. But my servers already been up for a while and I wanted to pull data from dat/essentials files.
Unfortunately essentials unique placeholder is global.

warm topaz
#

yea idk if essentials stores that kind of data

whole temple
#

Yup. player doesnt seem to have a placeholder for it either.
Well I guess its time to move on. Thanks!

odd jay
# steep thorn <@!407657061011423233> can you show what you've tried?

Yes, this is how the placeholder is going:

var placeholder = PlaceholderAPI.static.setPlaceholders(BukkitServer.getPlayer(args[0]), "%player" + "_ping%");

function ping() {
   if (placeholder >= 0 && placeholder < 150)
       return "&a" + placeholder;
   if (placeholder >= 150 && placeholder < 300)
       return "&2" + placeholder;
   if (placeholder >= 300 && placeholder < 600)
       return "&c" + placeholder;
   if (placeholder >= 600)
       return "&4" + placeholder;
}
ping();
```So when the args[0], is an online player, it correctly gives you the ping of that player. But when the player defined is Offline, it will return empty. So I wanted to change that empty value to something else, but the JS just breaks when you try to do it, so I think another way is needed for that.
turbid tide
#
var placeholder = PlaceholderAPI.static.setPlaceholders(BukkitServer.getPlayer(playername), "%player" + "_ping%");``` why?
#

why not just var placeholder = "%player_ping%"

#

?

#

also

#

var placeholder = parseInt("%player_ping%")

odd jay
#

Because I'm using the placeholder to detect the first argument on the JS, so you can see others ping

odd jay
turbid tide
#

I see now

#

ye

#

I missed that part

#

well try parsing it to an integer

odd jay
#

I updated the JS, I removed the unnecessary "playername" variable

turbid tide
#

also

#

there is already

odd jay
#

and added the args[0] directly

turbid tide
#

a player_ping_colored

#

isn't there?

odd jay
#

I will check, brb

turbid tide
#

and you can use parseOther to see other's ping

odd jay
#

Nop, there isn't colored ping, anyways, I would love to make that work (which is already working, but only the Offline thing is left yet) since I could do much more decorative and dope stuff with it.

turbid tide
#

isn't there

odd jay
turbid tide
#

a method to check if player is online

odd jay
#

I was also looking for that

#

it would solve it

turbid tide
#

I think its just Player#isOnline

odd jay
#

Yes, thats rightm, not sure about that hashtag

turbid tide
#

@odd jay %player_colored_ping%

#

it is a thing

#

just not how I thought its going to be named

#

and you can change the colors in the config.yml I think

odd jay
#

Gonna check that out too, sorry for the missknowledge

turbid tide
#

I mean that's why we're here. To help

odd jay
#

Oh at the end I could change the colors of it but not on where numbers to get changed. Also if I wanted to do it with JavaScript to change that, it would finish happening the same as before. And everythingg is already working good with the placeholder that I showed above, the only thing is to make the Player.isOnline check and do that detail, and I guess it would be done

#

"it would finish happening the same as before" since I would also have to use the arguments on the javascript and all that, which is already working on the previous one

#

Also, if I get to made it to solve the placeholder I sent previously, it would really help me a lot for the next placeholders I'm making.

#

Sorry, so what should I use to check if "args[0]" is online?

turbid tide
#

you probably want to do something like this: ```
var player = BukkitServer.getPlayer(args[0])
if (!player.isOnline()) "TEXT TO BE WRITTEN IF PLAYER IS OFFLINE"

#

no need for return or anything just that

odd jay
#

Oh, looks great

#
var placeholder = PlaceholderAPI.static.setPlaceholders(BukkitServer.getPlayer(args[0]), "%player" + "_ping%");
var player = BukkitServer.getPlayer(args[0])
if (!player.isOnline()) "&7¡Offline!"

function ping() {
   if (placeholder >= 0 && placeholder < 150)
       return "&a" + placeholder;
   if (placeholder >= 150 && placeholder < 300)
       return "&2" + placeholder;
   if (placeholder >= 300 && placeholder < 600)
       return "&c" + placeholder;
   if (placeholder >= 600)
       return "&4" + placeholder;
}
ping();
```Tried it like that, and it happens te same apparently, the JS breaks. It will just send the raw javascript placeholder when you parse it.
#

Oh wait

#

I forgot something I guess

#

Nope, still the same

turbid tide
#

hmm

#

wait

#

put the var placeholder = ... part

#

after player

#

after you check

odd jay
#

Wait again, I think I got it actually

turbid tide
#

if he's online or not

#

so it will look like this:

#
var player = BukkitServer.getPlayer(args[0])
if (!player.isOnline()) "&7¡Offline!"

var placeholder = PlaceholderAPI.static.setPlaceholders(player, "%player" + "_ping%");
#

since you don't need to get the player again

odd jay
#
   if (placeholder >= 0 && placeholder < 150)
       return "&a" + placeholder;
```It is caused by that `>= 0`, apparently it detects empty as 0, I will change it to `> 0` and then put the offline message specifically for 0
odd jay
turbid tide
#

kk

odd jay
#

Well, it keeps breaking, but I know for certain that the problems comes because when the player is offline, it returns like an invisible 0

turbid tide
#

I think its null

#

not invisible 0

#

actually idk if null is a thing in JS

odd jay
#
var placeholder = PlaceholderAPI.static.setPlaceholders(BukkitServer.getPlayer(args[0]), "%player" + "_ping%");

function ping() {
   if (placeholder >= 0 && placeholder < 150)
       return "&a" + placeholder + "&8ms";
   if (placeholder >= 150 && placeholder < 300)
       return "&2" + placeholder + "&8ms";
   if (placeholder >= 300 && placeholder < 600)
       return "&c" + placeholder + "&8ms";
   if (placeholder >= 600)
       return "&4" + placeholder + "&8ms";
}
ping();
```So when I parse this, for an offline player. It will return "&a&8ms"
#

when I did > 0 instead of >= 0, it would return nothing

#

but it would still work

#

Same here, Idk if its even possible to change a null value... but. Is there a way to change that "&a&8ms"?

#

If there is, I think it could get solved

turbid tide
#

believe me I am a bit confused.

#

ah

odd jay
#

Yeah no problem at all, it already helps me a lot discussing this here, I learn lol

turbid tide
#

try ```js
var placeholder = PlaceholderAPI.static.setPlaceholders(BukkitServer.getPlayer(args[0]), "%player" + "_ping%");

function ping() {
if (placeholder == 0)
return "Offline"
if (placeholder > 0 && placeholder < 150)
return "&a" + placeholder + "&8ms";
if (placeholder >= 150 && placeholder < 300)
return "&2" + placeholder + "&8ms";
if (placeholder >= 300 && placeholder < 600)
return "&c" + placeholder + "&8ms";
if (placeholder >= 600)
return "&4" + placeholder + "&8ms";
}
ping();```

#

try this

odd jay
#

it breaks when you do "placeholder == 0"

#

It will always show the raw javascript placeholder when you parse it

turbid tide
#

I see so if you just change it to > and don't use = at all

#

it will work?

#

even if the player is missing?

#

wait

#

wait

#

lets debug first

#

lets see what it actually happens

odd jay
#

yes it will work. And if the player is offline it will show "" literally

turbid tide
#

try just this: js var placeholder = PlaceholderAPI.static.setPlaceholders(BukkitServer.getPlayer(args[0]), "%player" + "_ping%"); placeholder

#

this is the entire cod

#

code*

#

like remove everything else including function and all that

odd jay
#

Alright

turbid tide
#

and see what happens when you parse the placeholder for an online player

#

and for an offline player

odd jay
#

Cool brb in 45 seconds

#

Wow what, it shows always empty for online players

turbid tide
#

wait

#

hmm

odd jay
#

I think its because I'm not telling the JS placeholder to return nothing

#

the only thing written rn is the variable

turbid tide
#

so it just returns an empty line

#

for both online and offline?

odd jay
#

Yup

turbid tide
#

ah

#

I know why

odd jay
#

I think I should add a function and put it to return "placeholder" right?

turbid tide
#
var player = BukkitServer.getPlayer(args[0])
var playerName = player.getName()
playerName``` try this code please