#placeholder-api

1 messages · Page 115 of 1

brisk coral
#

Use the pinned expansion Macro

odd jay
#

I'm back, so it also happened on the localhost :(.

austere hawk
#

ok

mint fable
#

idk

#

very confused

#

i swear includes worked

odd jay
#

Any chances that you are avaible to test it?:(

mint fable
#

uh

#

I don't have your placeholders

#

i was looking for one of mine (that used .includes)

#

didn't find one

odd jay
#

Oof, can you create a random simple one? just to test if it works with .includes

#
var placeholder = "%luckperms_check_permission_access.spawn%";

function returnEmpty()
{
  var changed = "";
  if (placeholder == "Yes" && placeholder2 == "")
    return "&aIt is permanent";
  if (placeholder2 == "")
    return "&cYou don't have";
  if(placeholder2.includes("s"))
    changed= placeholder2.replace("s", "&7Seconds");
  if(placeholder2.includes("m"))
    changed= placeholder2.replace("m", "&7Minutes&f");
  if(placeholder2.includes("h"))
    changed= placeholder2.replace("h", "&7Hours&f");
  if(placeholder2.includes("d"))
    changed= placeholder2.replace("d", "&7Days&f");
  return changed;

}
returnEmpty();```
Shouldn't `changed=` be separated from the =? like `changed =`
#

Or is the same?

mint fable
#

doesn't work

#

includes isn't a thing i guess

odd jay
#

Hmm, should it be suggested then?

mint fable
#

oh fuck

#

no you can't do it

#

need a different engine

#

fuck this look at this bullshit

#

String.prototype.includes is specified in ECMAScript 2015 ( ECMA-262 6th Edition). Nashorn engine implements ECMA-262 Edition 5.1)

#

nashorn uses 5.1 and includes needs 6

#

ffs so close

odd jay
#

NOOOO

#

i'm gonna cry tonight

mint fable
#

might be able to get it to work?

#

eh

#

nvm

#

rip

odd jay
#

:((

mint fable
#

i mean

#

split it now i guess

#

and just take the parts

#

and jam em together

rare lily
#

ECMA5 doesn't have let or const, so good luck :)

mint fable
#

?

odd jay
#

:((

mint fable
#

gl with what

#

no idea what let does

#

@rare lily

#

?

rare lily
#

Let is for variable defined only in scope

mint fable
#

ah

#

can do it without those i feel

#

blitzz was doing split earlier

odd jay
#

I barely know how to use JavaScript and only wanted to finish that single javascript for my minecraft server since it uses it everywhere, so I will wait what Blitz says, and if he refuses to help, then I will just deal with the current javascript :(.

mint fable
#

@turbid tide btw if you didn't see, includes doesn't work in nashorn engine

rare lily
#

Also, don't use changed= "a"

mint fable
#

?

rare lily
#

Cause you are making the code think that changed= is a variable

mint fable
#

really?

odd jay
#

I also thought that

#

I already told it more above

#

should I change it?

rare lily
#

Hm..

#

I think that is still valid

#

By some points

#

Oh wait nvm what i said, they're still valid

odd jay
#

Yeah probable, but cannot confirm since .includes crashes the console and won't let me test, I would need to take the .split way but idk how, I'm noobie :((

#

not crash, it spams a lots*

mint fable
#

also

#

the code was wrong

#

no matter what

odd jay
#

really?

mint fable
#

only returns the last thing

#

so

#

wtf

#

ok there

brisk coral
#

Replace the changed

odd jay
#

Huh? How can you test if it works on a Script Tester when you can't make the 2 first placeholders run the values that it should be supposed to show?

#

Replace the changed
sure

mint fable
#

frosty with what

brisk coral
#

changed = changed.replace

odd jay
#

with changed =

mint fable
#

you don't wanna do what you're about to

#

you're gonna replace things you don't want to

#

there is a d in Seconds

#

the best way is split and build

odd jay
#

If this is done, I will make sure this is submitted into the community javascripts xD

mint fable
#

send a ss of what the expiry time looks like?

odd jay
#

%luckperms_expiry_time_access.spawn%?

mint fable
#

ya what's the format

rare lily
#

Let me check my old Hangman script to check includes

odd jay
#

#d #h #m #s the # would be a number, and if the number is 0 it will dissapear, an example (when 0 minutes):
10d 10h 30s

mint fable
#

thienbao wym

odd jay
#

lol

mint fable
#

to see how you did it instead?

#

ah

#

it's easy

#
var placeholder2 = "%luckperms_expiry_time_access.spawn%";
var placeholder = "%luckperms_check_permission_access.spawn%";

function returnEmpty(){
  if (placeholder == "Yes" && placeholder2 == "")
    return "&aIt is permanent";
  if (placeholder2 == "")
    return "&cYou don't have";
  return placeholder2.replace("s ", "&7Seconds ").replace("m ", "&7Minutes&f ").replace("h ", "&7Hours&f ")replace("d ", "&7Days&f ");
}

returnEmpty();
#

wait

#

ok try that

#

@odd jay

odd jay
#

sure

#

1 sec

mint fable
#

should work ez pz

odd jay
#

server is opening, maybe 1 minute xD

#

or less

rare lily
#

Ok there we go

odd jay
#

just go for whatever

rare lily
#

Replace includes with contains if it fails

odd jay
#

sure, will have in mind

mint fable
#

would java just take it over? O.o

#

because contains isn't a thing for js strings

#

if discord doesn't fuck me over i could send the whole thing

#

when was contains added I see nothing about it online

rare lily
#

Idk

odd jay
#

there is a replace without a . before

#

and it throws an error

mint fable
#

but in some cases if you access a String as a Java object as a property of some input, you really have Java and would just call Java methods.

#

from online ^

#

so java does take it over

#

you know to fix it then @odd jay

#

i beleef

#

?tryandsee

tender vaporBOT
odd jay
#

yup

#

lmao

#

xD

mint fable
#

discord is not a recommended editor

austere hawk
#

hi

odd jay
#

it worked with everything except for seconds

mint fable
#

oh

#

replace the s with s

#

and try again

austere hawk
#

PlaceholderAPI does it work directly in bungee?

odd jay
#

sure

mint fable
#

also

#

remove the space after Seconds

#

:L

austere hawk
#

yes?

balmy marten
#

PlaceholderAPI does it work directly in bungee?
@austere hawk Not yet, but it's planned

austere hawk
#

😮

#

ok thanks c:

odd jay
#

it worked great! so now I wanted to fix something but Idk how.
So when you told me to remove the space on the "s" I did that, and realized then when the countdown runs and reach to second 0, it dissapears, and the number that comes after turns the first, in this case, the minutes, and since minutes have a space "m " it won't work for 1 second, it will also happen with hours and days

#

any possible way to fix that?

#

also, is it possible to make it so if it is "&f1&7Days" it will convert into "&f1&7Day" and same with the other ones

mint fable
#

uh

#

no idea rip

#

it just disappears thonking1

#

go back to the drawing board and use contains

#

since it works apparently

odd jay
#

really? cool, should I change it with the .replace?

mint fable
#

no

#

change it with the includes

odd jay
#

K, I will scroll back

#
var placeholder = "%luckperms_check_permission_access.spawn%";

function returnEmpty()
{
  var changed = "";
  if (placeholder == "aSí" && placeholder2 == "")
    return "&aIt is permanent";
  if (placeholder2 == "")
    return "&cYou don't have";
  if(placeholder2.contains("s"))
    changed= placeholder2.replace("s", "&7Seconds");
  if(placeholder2.contains("m"))
    changed= placeholder2.replace("m", "&7Minutes&f");
  if(placeholder2.contains("h"))
    changed= placeholder2.replace("h", "&7Hours&f");
  if(placeholder2.contains("d"))
    changed= placeholder2.replace("d", "&7Days&f");
  return changed;

}
returnEmpty();```
Now it only work for Hours :(.
#

But it does accept it!!:D

mint fable
#

uh

#

so

#

hmm

odd jay
#

Nop, actually it only detects the first one

mint fable
#

i can't rn

#

too much

odd jay
#

if it has days, then only Days

#

no worries, thanks!

#

I will wait for Blitz xD

#

You have been helping me for a long of time, I highly appreciate that cj

odd jay
#

So in case someone wants to try to help this is the actual state of it:

var placeholder2 = "%luckperms_expiry_time_access.spawn%";
var placeholder = "%luckperms_check_permission_access.spawn%";

function returnEmpty()
{
  var changed = "";
  if (placeholder == "aSí" && placeholder2 == "")
    return "&aIt is permanent";
  if (placeholder2 == "")
    return "&cYou don't have";
  if(placeholder2.contains("s"))
    changed= placeholder2.replace("s", "&7Seconds");
  if(placeholder2.contains("m"))
    changed= placeholder2.replace("m", "&7Minutes&f");
  if(placeholder2.contains("h"))
    changed= placeholder2.replace("h", "&7Hours&f");
  if(placeholder2.contains("d"))
    changed= placeholder2.replace("d", "&7Days&f");
  return changed;

}
returnEmpty();```
 Objectives with the Javascript:
1- Return "It is permanent" when the player has access.spawn on true without expiry. - Perfectly done ![Approved](https://cdn.discordapp.com/emojis/520488328072658944.webp?size=128 "Approved") 
2- Return "You don't have" when the player has access.spawn on false without expiry. - Perfectly done ![Approved](https://cdn.discordapp.com/emojis/520488328072658944.webp?size=128 "Approved") 
3- Change the time format of the countdown. So instead of (for example) showing "10d 1h 10m 1s", show it like "&f10&7Days &f1&7Hour &f10&7Minutes &f1&7Second" - Not done yet ![Warning](https://cdn.discordapp.com/emojis/520488318606114816.webp?size=128 "Warning") 

The current issues are that the format will work **but** it will only show it changed on the first number. For example, if days is the last number on the value, then it would show like this (for example): "&f10&7Days 1h 10m 1s", or if hours is the first number, then "&f1&7Hours 10m 1s". It only works for the first number... reason? We don't know. 
The other issue is that there isn't done yet a way to detect if there is "1" for one of the values and change it to singular instead of plural (so instead of "1Days", "1Day", respectively). 
Thanks in advance to anyone that tries to help. you can Ping me if you want.
brisk coral
#

You could use FrozenJoin and just not specify a first join action

last mesa
#

When will the 1.16 version of PlaceholderAPI be released, there is no way to get ecloud data now

leaden kraken
#

Check pinned messages

last mesa
#

thank you

gleaming python
#

I get [PlaceholderAPI] Failed to set ScriptEngine for javascript placeholder: error on startup, how can I fix this?

#

it worked before

glass narwhal
#

I can't seem to get mVdw placeholders to work with the %mvdw<placeholder>%, can someone help

warm topaz
#

what placeholder are u trying to use? do u have the mvdw expansion installed? do u have mvdwplaceholderapi with an mvdw plugin installed?

glass narwhal
#

How do i install the expansion

#

i have mvwd

warm topaz
#
/papi reload```
glass narwhal
#

oh

#

yeah i have that

#

i didnt know you meant the ecloud

#

and yes, I have the mvwd plugin installed

#

The mvdw are loading in

#

but I cant use them idk why

warm topaz
#

what placeholder are u trying to use?

glass narwhal
warm topaz
#

tokens_tokens isnt a placeholder according to the spigot page

glass narwhal
#

Their all custom.

#

but it shows their loading in

#

even ones from essentials dont seem to work

warm topaz
#

what does /papi parse me %mvdw_tokens_tokens% return?

glass narwhal
warm topaz
#

was there any errors when u downloaded mvdw expansion and reloaded papi?

glass narwhal
#

Not at all

#

so its an issue with the mvdw placeholder then

#

@final shadow can you help?

tender vaporBOT
#

@glass narwhal,

Hey!

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

wise scaffold
#

Wait, how does %bungee_total% work?

#

Am I supposed to have papi installed on proxy somehow?

brisk coral
#

I believe it accesses all the servers through redis and gets info that way

wise scaffold
#

I meant, what do I need to do to make it work?

#

Where do I download the ecloud expansion?

#

I guess that's not possible then.

spice solstice
#

hello. just came here to say I have a problem with using PAPI in my own plugin. If PAPI is not installed (I made this softdepend (softdepend: [PlaceholderAPI]), plugin fails to load saying next thing

[23:36:31] [Server thread/ERROR]: Could not load 'mypluginnamewhocares' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: me/clip/placeholderapi/expansion/PlaceholderExpansion
Caused by: java.lang.NoClassDefFoundError: me/clip/placeholderapi/expansion/PlaceholderExpansion
Caused by: java.lang.ClassNotFoundException: me.clip.placeholderapi.expansion.PlaceholderExpansion

Code I use to check if it is installed

if (getConfigurator().config.getBoolean("features.placeholders") && Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
  new PlaceholderAPIHook().register();
}```
#

i'm not sure I use correct channel

brisk coral
#

I mean yea, the import won't be found if papi is missing

spice solstice
#

oof

#

wait

#

my bad

#

nvm

#

thanks

sharp jay
#

lol

spice solstice
#

no wait. I still can't understand why it can't load without PAPI.

try {
  if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null && getConfigurator().config.getBoolean("features.placeholders")) {
  new PlaceholderAPIHook().register();
  }
} catch (Throwable ignored) {
}

if someone have time and probably want to help me (why) I can PM my repo

gleaming python
#

is there a specific needed java version for javascript placeholders to work?

mint fable
#

what java are you on

gleaming python
#

8

#

Java version: 1.8.0_242

mint fable
#

should work

gleaming python
#

I had 1 js placeholder that used to work, until i tried adding a 2nd placeholder and it broke both

#

keep getting [PlaceholderAPI] Failed to set ScriptEngine for javascript placeholder:

mint fable
#

send your config

gleaming python
#

i tried removing the placeholder i added, but the first one is still dead

#

sec

mint fable
#

and the placeholders

#

and the log

#

=paste

tender vaporBOT
#
HelpChat Paste

Please use a paste service to share configs, errors, code and long logs.
HelpChat Paste

gleaming python
#

Do you need main config or the javascript_placeholders.yml?

mint fable
#

send the js cfg

gleaming python
mint fable
#

the config

#

javascript_placeholders

#

also

#

what in the world is that

#

that's not a script

gleaming python
gleaming python
#

No matter how I do it, it just doesn't work

warm topaz
#

@gleaming python what does /papi parse me %player_has_permission_essentials.fly% return?

gleaming python
#

'yes'

#

I just keep getting [PlaceholderAPI] Failed to set ScriptEngine for javascript placeholder: error

warm topaz
#
#  file: party_name.js
#  type: string```
is this meant to be commented out?
gleaming python
#

ye

warm topaz
#

[16:46:02 WARN]: [PlaceholderAPI] Failed to set ScriptEngine for javascript placeholder: party_name because thats where the error is coming from

gleaming python
#

its commented out already

#

and still the same error

#

just for the haspermission placeholder

#

[PlaceholderAPI] Failed to set ScriptEngine for javascript placeholder: haspermission

warm topaz
#

add

  file: has_permission.js
  engine: 'nashorn'``` to the javascript_placeholders.yml
gleaming python
#

same error

robust ibex
turbid tide
#

what's your server version?

robust ibex
#

1.15.2

young finch
#

hey what's the reason if i'm getting Failed to set ScriptEngine for javascript placeholder:?

#

using the latest version (from pins)

turbid tide
#

try adding engine: 'nashorn' in javascript_placeholders.yml under your file: FILENAME.js

young finch
#

already have it

#
format:
  file: 'format.js'
  engine: nashorn```
gleaming python
#

That's the same problem I have ^

bronze bison
#

Try reloading papi /papi reload or restarting the server

gleaming python
#

Already did, more than once

fickle eagle
#

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

cunning elk
#

where can i get the most recent dev build?

#

is the pinned one the most recent?

balmy marten
#

Yup

cunning elk
#

ty

zenith scroll
#

Hi, when I want to link Bungeecord total players to DiscordSRV, the placeholder doesn't work.

#

I referenced this, but it still doesn't work.

#

%bungeecord_total% is the placeholder I used.

#

I have Bungee installed, and my config looks the same as the one on that page

crisp hound
#

that is so many versions behind the current one it looks like

#

i'd suggest updating to the current version

zenith scroll
#

The current version of PAPI?

#

I am

crisp hound
#

the link you sent is 1.8.2

#

current is 2.10.6

zenith scroll
#

Yea

#

I cant find any other documentation for Bungee config in PAPI

crisp hound
#

did you do all of this stuff

zenith scroll
#

/papi ecloud download Bungee?

#

Yes

crisp hound
#

yes

#

ok

zenith scroll
#

On all servers

crisp hound
#

oh well discordsrv might not work with papi placeholders

#

idkl

zenith scroll
#

It does

crisp hound
#

use the /papi parse command

#

and see if it works via that

zenith scroll
#

How do I use papi parse?

crisp hound
#

/papi parse <placholder> i believe

#

but just type /papi help

#

or /papi parse

#

or something

#

im sure theres a help message

zenith scroll
#

I have to do /papi parse ayseany %bungeecord_total%

crisp hound
#

yea probably

zenith scroll
crisp hound
#

that means its not working at all on your server

zenith scroll
#

or %bungeecord_total%

#

Yea

#

Thats why I'm confused

crisp hound
#

hmm

zenith scroll
#

Wait

#

Its %bungee_total%

crisp hound
#

lmao

#

i didn't even catch that

#

hopefully that works

zenith scroll
#

Still doesnt work tho

#

On the bot

crisp hound
#

does it work with papi parse

zenith scroll
#

On the server it returns a number yea

crisp hound
#

not a papi issue then

#

its the bot

zenith scroll
#

Weird

#

It says

#
# Sets the "Playing: ______" indicator for the bot.
# Can be a single, static value, or cycle through multiple different options
# You can preface the status with "playing", "watching", or "listening to" to set the activity type
# PlaceholderAPI placeholders are supported
#

So I was guessing its a PAPI issue

crisp hound
#

is disc srv running on your bungeecord or spigot servers

zenith scroll
#

Spigot

crisp hound
#

and its parsing properly via papi's parse command

#

so it should be working

#

if they do in fact support placeholders

#

i'd submit an issue with them

#

someone already did it lol

#

they fixed it in a dev build if you want to try that

zenith scroll
#

Lmaooo

#

Too funny

#

18hrs ago

#

:P

crisp hound
#

well you could try the dev build or jusit wait until its official lol

#

but thats probably the solution

zenith scroll
#

Ill try with the dev one

#

Yea it works :)

crisp hound
#

nice

karmic granite
#

Yo so, I just updated to 1.16, seems like some older plugins aren't working now, does papi not support the old expansions now?

brisk coral
#

"some older plugins aren't working"

karmic granite
#

nope, expansions, they seem to not load though

#

I also have not been able to see the ecloud list, it shows the amount of pages, but no expansions

brisk coral
#

Are you using the pinned version?

karmic granite
#

pinned meaning the latest?

#

cause if so, yes, im using 2.10.6

brisk coral
#

The version pinned in this channel

#

It's a dev build

karmic granite
#

oh, alright, i'll give that a try

#

ah, perfect, there was an issue with the LuckPerms expansion, seems like everything is fixed. Thank you!

obsidian niche
#

hi

#

pls help me

#

papi mysql

#

mysql query result may cause 0 exits

#

@mint fable

tender vaporBOT
#

@obsidian niche,

Hey!

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

obsidian niche
#

manual works when you type

gentle flicker
#

On the e-cloud website, how do I update the placeholder list for one of my expansions?

leaden kraken
#

Go to Your Expansions then Edit Expansion

gentle flicker
#

Okay thanks!

obsidian niche
#

@leaden kraken

#

Me?

obsidian niche
#

uuid working but {player} not working pls help me

rare lily
#

No one here understand what you even said..

obsidian niche
#

papi mysql query uuid working

#

okey

#

but {player} not working

#

select money from users WHERE username = '{player}' this query not working

brisk coral
#

Uh what? Is that an expansion or what?

junior musk
#

yeah there's a MySQL expansion

brisk coral
#

It's %player_name%, and ask the author of the expansion I guess

obsidian niche
#

what?

#

yes

brisk coral
#

{player_name} instead of {player}

obsidian niche
#

not wroking

brisk coral
#

And make sure you have the player expansion installed

obsidian niche
#

not working

#

result 0

brisk coral
#

Ask the expansion author 🤷‍♂️

obsidian niche
#

Who?

#

How communication author

rare lily
#

Wot

#

You mean "how to contact the author"?

#

I don't seem to find any possible contacts from the author though

#

I mean, i found the author name, but where to contact that dude ;p

#

Also "quary" :)

brisk coral
#

Yea was just checking, idk ask cube to see if he has his discord

rare lily
#

Found him on spigot at least lol

keen crown
#

OOOF

#

wait

#

ill dm the discord

violet yoke
#

Hi, any info when update papi to 1.16?

balmy marten
#

Dev build is pinned

#

Stable release will happen soon™️

violet yoke
#

good, thanks

leaden kraken
#

What's not stable with the pinned version?

#

seems fine

balmy marten
#

Yeah it pretty much is

#

just a couple of tweaks we've made since then

edgy geyser
#

hello ?

#

but why not work

#

so i want emoji

austere hawk
#

Uh emojis don't work in minecrAft

#

U need to use character map

#

@edgy geyser

edgy geyser
#

what ?

austere hawk
#

go to ur search bar (start)

#

then search character map

fluid chasm
#

i get this error with the statistics expansion

#

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

south girder
#

how to fix tags spaced? is there a way

#

uh where my javaskript folder ??

#

ive reinstalled mutiple times and no javaskripts.. ill try maybe making a folder

hearty tapir
#

Does somebody knows how to display in the lobby how many players on a other server?

fickle eagle
#

for placeholders?

hearty tapir
#

yes

#

i need a placeholder wich can do this

fickle eagle
#

okay

#

1 sec

hearty tapir
#

Thank u

south girder
fickle eagle
#

%player_online%

#

i think that

south girder
#

huh

fickle eagle
#

or players

hearty tapir
#

yeah but that problem is that this only display the amount of players that are on that server

#

Not on a other server

fickle eagle
#

oooh

#

for the wrold

hearty tapir
#

The Placeholder is in the lobby.

fickle eagle
#

world

hearty tapir
#

i use bungeecorde

fickle eagle
#

ahh

hearty tapir
#

for another server

fickle eagle
#

okay

hearty tapir
#

is this even possible?

fickle eagle
#

yes

#

just foudn ti actually

#

/papi ecloud download ListPlayers

#

di that

south girder
#

Um

#

Can i nget some help?

fickle eagle
#

dude i dont even work for support here

#

sorry

south girder
#

oh

hearty tapir
#

im sorry

obsidian niche
#

Plss helpme

#

Papi mysql {player} not working

#

Pls hlp me

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.

carmine veldt
#

you pasted the link twice

frank oracle
#

My deluxe tags are kinda bugging out

junior musk
#

use the dev build pinned

south girder
obsidian niche
#

@carmine veldt

grim frost
#

when will be papi for 1.16 version on spigot

#

i'm not tried 1.15 version on 1.16 i hope works

hearty tapir
#

Does somebody knows how to display in the lobby how many players on a other server?
@hearty tapir Somebody got an idea?

leaden kraken
#

@grim frost check pinned messages

grim frost
#

okey thanks

austere hawk
#

%math_0.25*({jobsr_user_jlevel_Oduncu}-1)%

#

whats wrong

#

its returns 0

turbid tide
#

what does /papi parse me %jobsr_user_jlevel_Oduncu% ?

austere hawk
#

2

#

oh okay

#

i found problem

#

my bad

cunning charm
#

Does EzPrestige have a PAPI placeholder for the cost of the next prestige? There was an MVDW placeholder for this, but the PAPI wiki only displays placeholders for current and next prestiges.

#

Yeah... I got that.

turbid tide
#

doesn't look like it

#

are you sure that nextprestige doesn't return the price?

cunning charm
#

I used one for FeatherBoard, but I'm changing to KiteBoard.

#

No, it displays the ID of the next prestige.

#

{ezprestige_nextprestige_cost} is what I used.

turbid tide
#

yeah I get it but doesn't look like there is any

dusty junco
#

Can anyone help me with my issue please?

turbid tide
#

what's your issue exactly?

cunning charm
#

Dang, that sucks. Would one exist for MVDW and not PAPI for any specific reason?

dusty junco
turbid tide
#

not sure actually

#

and it doesn't work if you do /papi parse me %placeholder% either?

dusty junco
#

Nope nothing

turbid tide
#

and all you changed is the server version?

dusty junco
#

Yes from 1.15 to 1.16

turbid tide
#

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

dusty junco
#

Its really bugging me

#

Yes about an hour ago but still nothing

turbid tide
#

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

dusty junco
#

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

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

oh yes, i have done that several times

turbid tide
#

and other luckperms placeholders work?

dusty junco
#

These are the only ones i have

turbid tide
#

as in /papi parse me %luckperms_prefix% works?

dusty junco
#

I get nothing back from that

turbid tide
#

this is very weird because for me it works

#

and am on almost latest build of 1.16

#

and not even using the dev build of PAPI

dusty junco
#

hmm interesting

obsidian niche
#

Blitzz pls helpme me

#

@turbid tide

turbid tide
#

well I would if you ask your question

obsidian niche
#

Papi mysql problem

#

{Player} variables not working

#

Query

turbid tide
#

papi mysql?

obsidian niche
#

Placeholder mysql

#

Placeholderapi mysql

turbid tide
#

oh I see

#

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

obsidian niche
#

Who help me

#

Select coins from coins_table where username = 'EmralRG'

#

Manuelly working

#

But

#

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

#

Not working

junior musk
#

try with {player_name}

obsidian niche
#

Not working

junior musk
#

then it isn't supported

obsidian niche
#

Plugin placeholderapi

#

This expantion

karmic marsh
#

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

turbid tide
#

javascript is your only option

karmic marsh
#

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

#

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

turbid tide
#

give me the math placeholder you want to use

karmic marsh
#

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

turbid tide
#

and what is the amount you want?

karmic marsh
#

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

#

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

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

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

jagged spear
#

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

turbid tide
#

oh I see

jagged spear
#

Here is this placeholder: %worldguard_region_name%

turbid tide
#

both of you need to use javascript then

#

javascript placeholders

jagged spear
#

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

turbid tide
#

1 sec I'll give you both a link

jagged spear
#

That would be great

turbid tide
jagged spear
#

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

turbid tide
#

oh

#

I mean its not that hard

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

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

#

Can't post screenshots

tender vaporBOT
#

@karmic marsh,

Uploading Images

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

karmic marsh
turbid tide
#

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

karmic marsh
#

Minehut 🤮

#

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

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

@turbid tide thanks, will this work?)

turbid tide
#

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

#

wdym Dada?

#

will what work?

narrow oyster
#

Is there a placeholder for EXP in papi for essentials?

turbid tide
#

there is one for exp but its not in essentials

narrow oyster
#

Ah.

turbid tide
#

its in the player expansion

#

%player_exp%

narrow oyster
#

Thanks a bunch!

#

I can't find the expansion.

#

welp

#

Nvm, I did.

turbid tide
#

oh

#

welp xD

fickle eagle
#

I need help

tender vaporBOT
#

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

fickle eagle
#

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

turbid tide
#

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

#

?paste

tender vaporBOT
#
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 - Usage
Hastebin

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.

fickle eagle
#

placeholder

#

Just says that

#

%placeholder%

#

In white text

#

seems like i cant paste the js file @turbid tide

junior musk
#

=paste

tender vaporBOT
#
HelpChat Paste

Please use a paste service to share configs, errors, code and long logs.
HelpChat Paste

junior musk
#

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

fickle eagle
#

@junior musk

#

I have mutiple javescript files

#

not just 1

junior musk
#

just send one of them

fickle eagle
#

ok

#

Thats one

junior musk
#

do /papi list

#

does Javascript shows in it?

fickle eagle
#

yes

junior musk
#

what's your PlaceholderAPI version?

fickle eagle
#

2.10.6

junior musk
#

server version?

fickle eagle
#

1.15.2

junior musk
#

when you do /papi reload

#

do you get anything in the console about javascript placeholders?

fickle eagle
#

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

#

failed to set scriptengine

#

for all my files

junior musk
#

send your javascript_placeholders.yml file

#

in your PlaceholderAPI folder

fickle eagle
#

ok

junior musk
#

(paste it on the site)

fickle eagle
junior musk
#

wtf

#

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

fickle eagle
#

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

trim mist
#

o.o

#

You should really update your Paper.

fickle eagle
#

that far back lol

#

1 sec

#

ill try

trim mist
#

Updating will be a night and day change oml.

fickle eagle
#

ok lol

#

think my hosting service was behind

#

lol

#

on those updates

#

now im updating to 371

#

okay

#

im on 371

junior musk
#

does it work now?

fickle eagle
#

no

#

for waht im doing

#

Nope

junior musk
#

what if you redownload the Javascript expansion?

fickle eagle
#

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

junior musk
#

/papi ecloud download Javascript
/papi reload

fickle eagle
#

nopenope

junior musk
#

=/

fickle eagle
#

is it the engine

#

Nashhorn

junior musk
#

nashorn yes

fickle eagle
#

think it could be that

#

cause

#

ik its a jsavascript engine

#

but idk if its working with placeholder

#

yeah

#

idk what to do lol

junior musk
#

neither do I =/

#

sorry

fickle eagle
#

all good

#

could you try to ask someone to help

junior musk
#

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

#

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

fickle eagle
#

rip

#

keep in mind

#

thisplugin did work before

#

i mean config

#

just stopped

junior musk
#

👀

fickle eagle
#

ikr

#

lol

junior musk
#

what if

#

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

#

and try to make one script load

fickle eagle
#

i could try

#

but i dont see how this will effect placeholder api

#

if i just copy a scripy

#

wont i do the same

#

?

junior musk
#

I have no idea x)

fickle eagle
#

okay 1 sec

#

nope

#

didnt wokr

#

work

junior musk
#

=/

undone storm
#

placeholder api placeholders arent working in skript for me

#

both skript and papi are up to date

#

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

#

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

junior musk
#

ask Skript if it even supports PAPI

#

I think it needs an addon

undone storm
#

ok

#

also does my server need to be spigot

#

mine is paper and that might be the issue

junior musk
#

I don't think so

undone storm
#

ok

junior musk
#

I don't see why it would affect

polar umbra
#

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

median copper
#

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

storm cedar
#

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

turbid tide
#

in the pinned messages here

storm cedar
#

ty

turbid tide
#

no problem

austere hawk
#

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

#

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

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

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

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

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

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

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

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

jolly crystal
#

Github is apparently down. that might be the issue.

austere hawk
#

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

trim mist
#

It's random

warm topaz
#

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

pale berry
#

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


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

As you're declaring faction as an array

#

so it will be returned as an array

#

Just remove the square brackets and you should be fine

pale berry
#

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

junior musk
#

try to remove the " " around the placeholders

turbid tide
#

nah that will break it

#

he needs to parse as Integers

balmy marten
grave sonnet
#

how do I use luckperms with deluxe chats?

warm topaz
#

#spigot-linking

grave sonnet
#

how do i do that?

warm topaz
#

follow the instructions on the channel

turbid tide
fluid chasm
#

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

brisk coral
#

Use the pinned version of the statistics expansion

fluid chasm
#

thanks

quiet dune
#

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

#

javascript_placeholders:

wg_isowner:
  file: example.js
  engine: nashorn

example.js:

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

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

tranquil sapphire
#

whats the placeholder to show world time?

warm topaz
#

%world_<world>_time%

#

smh did u not see it blitz 😅

turbid tide
#

I did actually

#

am looking for something else

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

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

late wraith
#

Hey so

#

What exactly is placeholderapi used for

junior musk
#

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

#

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

late wraith
#

Ok thanks

final shadow
#

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

junior musk
#

👀

slate oar
#

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

junior musk
#

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

slate oar
#

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

junior musk
#

ah

#

🤔

slate oar
#

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

junior musk
#

couldn't find a placeholder for that =/

#

I'll try to check something

#

I may have something

#

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

totalexp:
  file: totalexp.js

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

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

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

#

try that

#

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

#

I'll still have another idea in mind in case

#

@slate oar

#

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

slate oar
#

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

junior musk
#

okay

slate oar
#

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

junior musk
#

=/

#

last idea I have is using scoreboard objectives

slate oar
#

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

junior musk
#

/scoreboard objectives add exp xp (or exp idk)

#

then use %objective_score_exp%

slate oar
#

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

junior musk
#

ffff

#

I don't have any other idea =/

slate oar
#

when you die, the xp is classified as score

#

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

#

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

odd jay
#

Whats the opposite of .contains?

#

Anyone knows?

#

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

#

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

junior musk
#

I think before the string/variable

#

!yourVar.contains("text" )

odd jay
#

k! I will try, thanks gab

#

works great, thanks again gab

junior musk
#

👍

odd jay
#

What a shorty thumb

junior musk
#

👎

odd jay
#

😂

junior musk
#

🙃 👎

severe coral
#

Anyone experiencing issues with javascript placeholders?

#

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

mint fable
#

=paste

tender vaporBOT
#
HelpChat Paste

Please use a paste service to share configs, errors, code and long logs.
HelpChat Paste

mint fable
#

send the entire log

severe coral
mint fable
#

umm

#

that is not the entire log

#

?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.

mint fable
#

can you also send over the javascript_placeholders.yml

severe coral
mint fable
#

why don't you send entire files

severe coral
#

that's the entire javascript_placeholders.yml file

mint fable
#

that would make sense

#

why are you trying to configure it like deluxemenus

#

O.o

#

hmm

severe coral
#

Its been like that for ages lol

mint fable
#

that's nowhere near correct

#

lemme get the link

tender vaporBOT
#
Javascript
Useful Links & Information:

An expansion that allows you to use javascript for processing
Wiki
Community Scripts
GitHub
eCloud

mint fable
#

check the wiki

#

you know

#

that's nowhere near correct
that's not right

#

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

severe coral
#

ok shortened

mint fable
#

can you still send over the entire startup log?

severe coral
#

to just file

#

yea 1 sec

mint fable
#

it could be due to server stuff

severe coral
#

started happening since 1.16

#

tried with dev build and latest stable, same result

mint fable
#

that is where you should've started

#

@trim mist ?

severe coral
#

sorry, thought it was unspoken about latest version

mint fable
#

latest version is 2.10.6

#

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

severe coral
#

yea, we were on 2.10.6 issue arose after 1.16 update

#

tried latest dev build, same result

mint fable
#

can't read minds tho

trim mist
#

Do you have ChatControlPro?

severe coral
#

indeed

mint fable
#

What's the issue there glare?

trim mist
#

Use the jar linked in that comment.

mint fable
#

ah perfect

trim mist
#

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

severe coral
#

awesome, thanks Glare

#

will try that

mint fable
#

now I can keep this in mind

severe coral
#

woop woop, that worked. Thanks a lot

#

not sure how niche javascript users are on PAPI

#

but pinning that would help others I'm sure

#

thanks again

mint fable
#

already pinned in my mind

severe coral
#

that meme popped in my head before you posted it lol

mint fable
#

in your head you say?

severe coral
#

oh god inception

odd jay
#

brain power

odd jay
#

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

#

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

#

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

mint fable
#

are you asking for java? javascript?

odd jay
#

Javascript

mint fable
#

=paste

tender vaporBOT
#
HelpChat Paste

Please use a paste service to share configs, errors, code and long logs.
HelpChat Paste

mint fable
#

send what you have

odd jay
#

is it really needed? Im on phone rn xD

mint fable
#

how am I supposed to help you

#

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

odd jay
#

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

#

still opening :l

#

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

mint fable
#

you have no brackets

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

o

#

1 sec and I will update

mint fable
#

if statements without brackets run the next line if true

odd jay
#

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

mint fable
#

just good to provide details

#

glad it works 👍

odd jay
#

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

#

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

#

(using the messiest way)

high swift
#

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

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

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

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

junior musk
#

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

high swift
#

Ah yeah sry ^

scenic marlin
#

?help

tender vaporBOT
#
FAQ Answer:
» Give the helpers some details
» Ask suitable questions
» Be polite
» Wait

Source

gray ibex
#

where you guys will update placeholders for 1.16 ? Ty 🙂

gray ibex
#

Thank you Waffle 🙂

heady haven
#

Is there a server online status placeholder? for bungee

polar umbra
#

Yo

#

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

#

That'd be fairly useful

robust ibex
#

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

polar umbra
#

for EZBlocks?

#

Oh it's literally just statistic

#

Yeah idk

robust ibex
#

Well, i wasn't asking you 😂.

polar umbra
#

Ik, i thought it was EZBlocks u were talking about

#

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

#

I thought I could've helped but nah

mint fable
#

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

#

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

#

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

polar umbra
#

ty dude

leaden fern
#

official papi 1.16 when 😛

warm topaz
#

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

junior musk
#

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

warm topaz
#

learn java fingerguns

#

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

junior musk
#

yeah ik

#

but idk java ;-;

#

and I'm too lazy to learn x)

warm topaz
#

☹️

junior musk
#

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

#

;-;

warm topaz
#

np ill make it in kotlin instead fingerguns

slim talon
#

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

brisk coral
#

Elaborate

slim talon
#

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

rotund pendant
#

Upload your latest.log to pastebin @slim talon

warm topaz
#

use the dev build in this channel

#

its built against 1.16.1

rotund pendant
#

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

slim talon
#

Sorry

#

Anyway i solved

rotund pendant
#

Good to know.

slim talon
#

Sorry for disturbing

rotund pendant
#

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

slim talon
#

Thx anyway 😄

brisk coral
#

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

junior musk
#

yeah ;-;

#

but apparently

#

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

#

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

#

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

plucky pawn
#

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

odd jay
#

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

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

maybe with regex

#

but idk if .contains supports it

brisk coral
#

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

junior musk
#

true lol

brisk coral
#

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

odd jay
#

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

#

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

#

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

junior musk
#

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

#

ah

#

oki👍

odd jay
#

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

#

anyways* not wars please

junior musk
#

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

#

not before

odd jay
#

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

junior musk
#

wut...

#

it checks if the stirng contains " 1d"

#

so...

odd jay
#

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

junior musk
#

" " + "%placeholder%"

odd jay
#

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

junior musk
#

x)

odd jay
#

Thanks a lot gab

obsidian charm
#

When papi official 1.16 version?

warm topaz
#

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

obsidian charm
#

Ok thank you

trim mist
#

Use dev builds

#

Pinned is old.

warm topaz
#

o wheres the new ones?

trim mist
warm topaz
#

👍

coarse sable
mint fable
#

Hover over Expansions and click Your Expansions @coarse sable

coarse sable
#

Foud it, thanks!

mint fable
#

also, you can refer to that as the eCloud

#

😉

coarse sable
#

How does that rating system work?

mint fable
#

well

#

it doesn't

coarse sable
#

xD

#

Alright, then.

odd jay
#

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

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

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

#

Thanks a lot, Blitz, Cj and Gab!

austere hawk
#

Somebody tell me why it doesn't work 😦

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

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

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

#

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

#

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

rain quiver
#

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

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

make sure ur on latest mvdwplaceholderapi

random hazel
#

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

#

it is %javascript_greaterThan,10,20%

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

this is in the javascript_placeholders.yml file:

greaterThan:
  file: greaterThan.js
#

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

turbid tide
#

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

random hazel
#

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

#

it works when I remove the arguments ,10,20

turbid tide
#

oh

#

try not to declare var placeholder; before

#

just do directly var placeholder = args[0]

#

and see if that could fix it

junior musk
#

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

turbid tide
#

oh tang is right

junior musk
#

%javascript_greaterThan_10,20%

turbid tide
#

didn't even notice that

junior musk
#

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

random hazel
#

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

turbid tide
#

yeah

random hazel
#

like {vault_eco_balance}?

turbid tide
#

use {} instead of %%

brisk coral
#

{}

turbid tide
#

yep

random hazel
#

cool

brisk coral
#

You might need to parse it beforehand yourself