#placeholder-api

150650 messages · Page 43 of 151

sour dune
#

quick instructions:

  1. install javascript papi extension
  2. create a folder in the PlaceholderAPI one called "javascripts"
  3. make a new file in javascripts called "townyprefix.js"
  4. paste this code into there:
function townyPrefix() {
  if ("%townyadvanced_town%" !== "") {
    return "%townyadvanced_town%";
  } else {
    return "No Town";
  }
}
townyPrefix();
  1. make a file in PlaceholderAPI folder called "javascript_placeholders.yml"
  2. put this in the file:
townyprefix:
  file: townyprefix.js
  1. use the placeholder %javascript_townyprefix%
fringe dune
#

aha

#

thank you

sour dune
#

yw

fleet grove
#

How can I use my placeholder from placeholderapi on plugins like featherboard that use mvdwplaceholderapi?

warm topaz
#

{placeholderapi_<placeholderapi_placeholder_here>}

fleet grove
#

Thanks

frank gazelle
#

Bump

#

This part of it too

sour dune
#

Wanted to bump this message (get the number of players in a dimension regardless of worldname)

errant iron
#

Why does the world name change?

#

Paste the entire error

austere hawk
#

can i create Placeholder?

errant iron
#

If you make an extension

#

Or are you making a plugin? You can natively include placeholders if you are

austere hawk
fleet grove
warm topaz
#

%mvdw_{mvdw_placeholder}%

fleet grove
#

alright thanks

narrow cloak
#

HI?

#

anyone in here active?

#

i need Deluxe Menus to use my Tokens plugin as the Economy

#

since i want to make a backpacks GUI but i need it to check to see if they have the right amount of tokens or not

errant iron
#

what tokens plugin?

narrow cloak
#

Tokens

#

and i got it working but how do i get the math placeholder to output a formated output

narrow cloak
errant iron
#

afaik you'd need the javascript placeholder to add formatting to the math's output

narrow cloak
#

can i find that somewhere?

#

since i dont know how to code java lol

errant iron
#

javascript isn't the same as java, but it's really not too bad

narrow cloak
#

o ok

#

how egcactly do i add javascript to %math_0:_75000-{Stars_balance_format}%?

errant iron
#

you make a javascript file that calculates that and returns it formatted

#
function numberWithCommas(x) {
    return x.toString().replace(/\B(?<!\.\d*)(?=(\d{3})+(?!\d))/g, ",");
}```
#

just do that to whatever the result of your math placeholder is

narrow cloak
#

so i would have to duplicate that java script 2 more times for what i need?

errant iron
#

well you can use that function as many times as you want

narrow cloak
#

i have no expeirence in java or javascript lol

#

how would i be able to make it pull the players token balance

errant iron
#

you can resolve placeholders

narrow cloak
#

still doesent really translate to me lol do you know how to do it?

errant iron
#

parseInt('%player_health%')

narrow cloak
#

o ok but i dont even know where to start unless i should use one of the premade scripts on the github

tired wharf
narrow cloak
#

so this is rounded playerhealth how do i change that to minus 75000 off the token balance

#

function hp() {
return Math.round(parseInt('%player_health%') * 100) / 100;
}
hp();

#

so i get rid of .round and 75,000 - parsein?

narrow cloak
#

i have this rn but theres a red x and adobe brackets "function hp() {
return Math 75000 - (parseInt('%Stars_balance_format%');
}
hp();"

errant iron
#
function numberWithCommas(x) {
    return x.toString().replace(/\B(?<!\.\d*)(?=(\d{3})+(?!\d))/g, ",");
}

function displayTokens() {
  return numberWithCommas(parseInt('%stars_balance_format%') - 75000);
}
displayTokens();```
#

something like that

narrow cloak
#

o ok intresting

#

so would Adobe Brackets let me preview or should i just upload that

errant iron
#

the text editor brackets?

narrow cloak
#

yes

errant iron
#

uh I'm not sure, does it support javascript?

#

I'd use VSCode lol

narrow cloak
#

i copy and pasted that and its complaing about errors with it lol

#

with line 2

#

as theres an big x there

errant iron
#
function numberWithCommas(x) {
    return x.toString().replace("/\B(?<!\.\d*)(?=(\d{3})+(?!\d))/g", ",");
}

function displayTokens() {
    return numberWithCommas(parseInt('%stars_balance_format%') - 75000);
}
displayTokens();```
#

I verified in VSCode it looks good

#

though I've also never written a JS papi script

#

so who knows

narrow cloak
#

notepad++ doesent complain

errant iron
#

notepad++ doesn't do linting

narrow cloak
#

o ok

#

so do i use the filename when useing %javascript_<your placeholder identifier>% or displaytokens?

errant iron
#

filename afaik

tired wharf
#

identifier?

#

if your identifier is displaytokens

narrow cloak
#

is displaytokens the identifier?

tired wharf
#

you set it up

#
identifier:
  file
narrow cloak
#

i dident yet

tired wharf
#

you didn't set it up in the javascript file?

#

well you'd use the identifier, I believe it says what to use in the javascript yml as well

errant iron
#

ah yes you'd do like

  file: displaytokens.js``` or whatever you named it
tired wharf
#

yeah

narrow cloak
#

kk thanks

tired wharf
#

oh don't forget engine

#

it has an example

narrow cloak
#

%javascript_displayTokens% is the placeholder?

tired wharf
#

yeah, whatever you make the identifier

#
displayTokens:
  file: displayTokens.js
  engine: nashorn
#

displayTokens in this case ^

narrow cloak
#

i saw this in console

#

<eval>:2:65 \B(?<!.\d*)(?=(\d{3})+(?!\d)) near index 3
\B
return x.toString().replace(/\B(?<!.\d*)(?=(\d{3})+(?!\d))/g, ",");
^ in <eval> at line number 2 at column number 65

errant iron
#

copy paste my new code

narrow cloak
#

since discord messed it up

tired wharf
#

yeah

#

=paste

tender vaporBOT
tired wharf
#

use that to paste code

#

or errors, yml files

errant iron
#
function numberWithCommas(x) {
    return x.toString().replace("/\B(?<!\.\d*)(?=(\d{3})+(?!\d))/g", ",");
}

function displayTokens() {
    return numberWithCommas(parseInt('%stars_balance_format%') - 75000);
}
displayTokens();```
#

put that in

narrow cloak
#

ok so it returned -74970 without commas and kk

#

o this would be flipped since the msg only shows if the player cannot afford it numberWithCommas(parseInt('%stars_balance_format%') - 75000);

#

so the player will always have below 75000 when they see the msg

errant iron
#

sorry so you want it to return whether or not they have 75000 tokens?

narrow cloak
#

so it should be 75,000 minus there tokens balance

errant iron
#

okay, so swap it

narrow cloak
#

yea

#

so im reading your java script i think i can understand what its doing lol

#

so the top part would replace all those symbols with ,

#

and you put it below so it is able to use that function

errant iron
#

the top function is a very complicated regex I stole from the internet that slaps in commas every 3 numbers in front of the decimal, yeah

narrow cloak
#

o ok

tired wharf
errant iron
narrow cloak
errant iron
#

since none of them must be set, or something

tired wharf
#

how could I improve that function

errant iron
#
return numberWithCommas(75000 - parseInt('%stars_balance_format%'));
errant iron
#

then have a switch statement based on that, and not 16 variabels

narrow cloak
#

so when i do "papi parse me %javascript_displayTokens%" it does not show commas?

errant iron
#

did you put quotation marks around the regex

tired wharf
#

yeah idk

narrow cloak
#

regex?

errant iron
#

the (())())( thing

narrow cloak
errant iron
narrow cloak
#

im going to have to say say prob not?

errant iron
#

huh that really doesn't work? hmmm

#

nah you did

narrow cloak
#

o ok

tired wharf
#

like I am not an expert any any form of coding/java scripting 😂 I don't even know where to begin to check for a certain part of that permission

narrow cloak
#

does the x next to numberwithcommas have anything to do with it?

errant iron
errant iron
narrow cloak
#

o ok

#

im going to have alot to learn when i go to college as i know there going to go over javascript lol

errant iron
#

javascript is quite easy, I assure you

narrow cloak
#

kk thats good

#

i never really spent the time to learn any codeing language but i do want to learn it

#

i found this on google" function numberWithCommas(x) {
x = x.toString();
var pattern = /(-?\d+)(\d{3})/;
while (pattern.test(x))
x = x.replace(pattern, "$1,$2");
return x;
}

#

on a site called stack overflow "How to print a number with commas as thousands separators in JavaScript
"

#

it works

errant iron
#
function displayTokens() {
    var nf = new Intl.NumberFormat();
    return nf.format(parseInt('%stars_balance_format%') - 75000);
}
displayTokens();
#

try that

narrow cloak
#

google already got it fixed lol

#

do you want me to use it tho?

narrow cloak
errant iron
#

yeah use mine, that one will do that after the decimal

#

wot

#

what error

narrow cloak
#

[02:00:45 ERROR]: [PAPI] [Javascript-Expansion] An error occurred while executing the script 'displayTokens':
ReferenceError: "Intl" is not defined in <eval> at line number 2

errant iron
#

okay I guess this version of JS doesn't support that

#

whatever, use your regex thing lol

narrow cloak
#

lol i mean it works

#

thank you for all your help 🙂

tired wharf
#
var permission = "%luckperms_has_permission_ardor.prefix.format%";
var p = permission.substring(19);

this for the variables Star?

#
var permission = "%luckperms_has_permission_ardor.prefix.format%";
var p = permission.substring(45);

function permission() {
    if (p.indexOf(".1"); === "true") {
        return "ardor.prefix.format.1"
    }
#

maybe?

tired wharf
#

I mean, the only reason I'm trying to make this placeholder is so I can set and unset permissions for the colors in a GUI without having to unset every option each time, I'm sure there's a better way to do that..

junior musk
#

try something like var permission = "%" + "luckperms......";

tired wharf
#

hmm

junior musk
#

then parse it with PlaceholderAPI.static.setPlaceholders(BukkitPlayer, "placeholder here")

tired wharf
#

well I'm not using java, just javascript

junior musk
#

works as well here

#

and also, I'm not quite sure how your script works x)

#

p.indexOf(".1")

#

you're checking if the % is equal to .1? 😅

#

since p = permission.substring(45)

#

and that would return the % in the permission string

#
var permission = "%"+"luckperms_has_permission_ardor.prefix.format.";
var list = ["1","2","3","4","5","6","7","8","9","0","a","b","c","d","e","f"];
function permission() {

    for (var i=0;i<list.length;i++) {
      var p = PlaceholderAPI.static.setPlaceholders(BukkitPlayer,permission+list[i]+"%");
      if (p == "true") {
          return "ardor.prefix.format."+list[i];
      }
    }
}
permission();
#

try that

#

oh wait

errant iron
#

might want ardor.prefix.format.[i]

#

lol

junior musk
#

yup

errant iron
#

but excellent, that's exactly what I was talking about!

junior musk
#

that was a pain to do on phone

#

back to sleep now

warm plover
#

Is there a way I can do %checkitem_give% for mob spawners?

#

I'm not exactly sure the new 1.16 way to get mob spawners with a mob inside lol

#

or if anyone knows a /give command to get a mob spawner with a mob let me know, ive been searching for like 15 minutes lol

tired wharf
#

ah

tired wharf
tired wharf
turbid tide
split quest
#

Hi, I have a problem and it is that when I put the placeholderapi it turns out that the chestcommand I can't open it, I can't find the holderapi if it needs it, what solution is there?

reef sinew
#

Is there a way to make it so the date format displays am/pm?

fringe canyon
#

any one knows why this output doesnt return %math_[precision:0]100/1000000*{vault_eco_balance}%%

silver minnow
#

probably because you have 2 % 🤷

turbid tide
#

nah

silver minnow
#

oh

turbid tide
#

Does it just return the placeholder itself?

fringe canyon
#

normal it to show a %

#

it worked in the past but on 1.16 it seems not to work

turbid tide
#

ahhh can you do /papi info Math and tell me the version?

fringe canyon
#

1.2.0

turbid tide
#

yeah ok use this instead: yml %math_0:_100/1000000*{vault_eco_balance}%%

fringe canyon
#

thanks

steep thorn
#

Anybody knows if there's a placeholder to get total mob kills?

#

Or should I use math expansion and manually sum all of them up?

turbid tide
turbid tide
#

yeah I know. There's quite a few that are not listed there I think

warm plover
#

I'm having an issue, I have a checkitem remove placeholder to remove a piece of armor but it removes enchanted armor too

#

so if someone wants to sell netherite armor, but they are wearing it too, its going to sell the enchanted one first :(

tawdry saddle
#

The import me.clip cannot be resolved

#

why

turbid tide
#

did you add the dependency to your maven/gradle?

austere hawk
#

Hello, there is an error in deluxemenus about the PAPI-TokenEnchant api, does anyone know how to solve this error?

#

the server is 1.8

warm topaz
#

whats the error

#

?paste

tender vaporBOT
austere hawk
#

says it doesn't recognize Token expansion

#

I have a photo only, how can I send it?

#

?paste

tender vaporBOT
austere hawk
#

that's the current error the DeluxeMenus gives me

tender vaporBOT
turbid tide
#

wrong version of deluxemenus for 1.8 ^

#

also the problem is that one of the token enchant placeholders is just broken

#

and returns null

#

so it breaks the menu

austere hawk
#

what is the correct version for 1.8?

vivid sparrow
#

Look at the list sent by Barry

austere hawk
#

Is there a placeholder for the total number of blocks broken in a world

#

And how can I put it in a leaderboard

#

Help

#

This is urgent

turbid tide
#

Just in total

austere hawk
#

ye

#

in total

turbid tide
#

%statistic_mine_block%

#

and you can make a leaderboard by using a plugin like LeaderHeads or ajLeaderHeads

austere hawk
#

oki

#

will simplescore work

#

it says it supports papi

turbid tide
#

well I guess it will

arctic zealot
#

hi

#

skript expansion isn't work

warm topaz
#

pinned messages

turbid tide
#

oh it got pinned

arctic zealot
#

okay thanks

tender vaporBOT
austere hawk
turbid tide
austere hawk
austere hawk
#

wait no no no

#

i mean

#

scoreboard

#

like on the side?

turbid tide
#

you said you'll use SimpleScore. That should work

austere hawk
#

i hope.

quick tinsel
#

Hi, when I try to get the MySQL expansion working I get this error - https://paste.helpch.at/diqulidobo.pl
I've tried with the latest version as well as the 1.3.0 version from 2019 (second latest release)

All expansions are loaded on server start, then when I log online everything breaks

turbid tide
#

ugh yeah that expansion is broken. 1 sec I remember their being a more updated one somewhere

#

Nope nvm. I guess no one fixed it.

#

Its also weird that the ecloud one was updated in February but the original one on github was only udpated 5 months ago.

#

Oh nvm it still is the same. He just updated it later

quick tinsel
#

I'll find another way, but thanks

#

😄

#

Appreciate the help

warm tendon
#

When i do %player_server% it returns the value Now available in the server expansion thought i have player and server downloaded

warm tendon
#

(bungeecord server name)

silver minnow
#

(/papi parse me %player_server%)

warm tendon
#

Now available in the server expansion thought i have player and server downloaded

#

oh

austere hawk
tender vaporBOT
silver minnow
#

im confused

warm tendon
warm tendon
silver minnow
#

thx

#

what da

silver minnow
#

OH

#

cmon bot

#

there we go

warm tendon
#

%server_name%
seems to show the MOTD

silver minnow
#

o

warm tendon
#

A Minecraft Server i get

silver minnow
#

hm

austere hawk
#

placeholder api should go on just bungee or all servers?

warm tendon
#

PAPI isnt bungeecompatibel

#

so all servers

austere hawk
#

except bungee

#

ok

warm tendon
silver minnow
#

no :c

#

sorry

warm tendon
#

thanks tho

austere hawk
#

Tried it now but it doesnt work

zenith pebble
#

If I were to make an addon, how could I get it to be in the ecloud library

tired wharf
errant iron
#

oh yeah he added it lol

tired wharf
#

ah

#

could you assist me further on it?

#

it provides an error

#

seems like an easy fix I just am not experienced enough lol

errant iron
#

Did you add the config code to javascript_placeholders.yml?

tired wharf
#

yeah

errant iron
#

Hastebin your javascript_placeholders.yml

tired wharf
#

okay

errant iron
#

and the file prefixcolor_permission.js is in the /plugins/placeholderapi/javascripts/ folder?

tired wharf
#

yes

errant iron
#

might need to rename the method?

#

not sure

tired wharf
#

I can try

#

alright it works now

#

thanks so much

#

I renamed it to hasPermission

errant iron
#

nice

tawdry saddle
#

The import me.clip cannot be resolved

#

why

brisk coral
#

Switch to IJ

errant iron
#

did you add it to gradle/maven

tawdry saddle
#

i just simply add it as a external JARs

errant iron
#

oh boy

tawdry saddle
#

where i can see what i added to gradle/maven

errant iron
#

in your pom.xml or build.gradle file lol

brisk coral
errant iron
#

yeah you won't get any help in Eclipse lol

tawdry saddle
#

oh

brisk coral
#

Doubt anyone here uses eclipse, so I've no idea how it works

tawdry saddle
#

how can i add external jars in ij

brisk coral
#

You use gradle/maven

tawdry saddle
#

maven

#

i think

#

yes , i am using maven

errant iron
#

okay now swap to gradle

brisk coral
#

:kek:

tawdry saddle
#

changed to gradle

#

Method does not override method from its superclass

#

🥲

#

so how can i add external jars in ij

errant iron
#

you just link them in gradle

#

no need to link your own jars

tawdry saddle
#

what do you mean ,

#

i know how to link papi

#

but there are some jars that not on internet

errant iron
#
repositories {
    maven {
        url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/'
    }
}

dependencies {
    compileOnly 'me.clip:placeholderapi:{VERSION}'
}```
#

you do that

tawdry saddle
#

i did

#

how about my own lib jar

errant iron
#

oh I see hold on let me get it

tawdry saddle
#

in local

brisk coral
#

Make a libs directory

#

add the jar to that, and use it like that

errant iron
#

implementation(fileTree("lib")) its that for the kotlin syntax

#

i forget what it's like for groovy bois

#

implementation files('libs/something_local.jar')

#

that's it for groovy

tawdry saddle
#

oh ok

austere hawk
#

or is this placeholder built in

turbid tide
#

/papi ecloud download Statistic then /papi reload

austere hawk
#

in terminal?

#

or console

#

or in game

turbid tide
#

console or ingame

#

both should work

austere hawk
#

kk

#

its jsut showing 10

#

nothing else

#

wait i spoke to soon

#

wait

#

When I break a block, it goes up by 2

#

yeah it keeps going up by 2

#

wait some blocks are 1 some are two

turbid tide
#

is your server 1.8 by any chance?

austere hawk
#

1.16.5

#

flowers are 1 block, and like logs are 2?

errant iron
#

that's the default minecraft implementation

#

all the placeholder does is read it

turbid tide
#

hmm

#

I don't think minecraft has a total

errant iron
#

p sure it keeps track of blocks mined

austere hawk
#

how can i make it like work?

turbid tide
turbid tide
austere hawk
#

bro

#

that annoying

#

that just doesn’t make sense though

turbid tide
#

I know this was a problem on 1.8 as well bcz GRASS was counted twice. As soil and as grass as well

austere hawk
#

now my 50 person event wont work as i wanted it too

turbid tide
#

so it might be the same thing here

errant iron
#

I mean, they're all mining the same amount of blocks right?

austere hawk
#

they dont all mint he same amount

#

they

#

one can mine 100 one can mine 50

errant iron
#

oh well as long as the numbering is consistent, you can set your goal or whatever right?

turbid tide
#

but Star not all materials are counted twice

#

just some

austere hawk
#

leaves are one wood is 2

#

its so annoying

errant iron
#

well yeah but like if you're tracking number of stone mined or something up to a total you know how many each stone is worth right?

austere hawk
#

its grass, stone, wood, leaves

turbid tide
#

what Star is saying use the per material count and then use the math expansion to calculate them. If they're just like 3-4 of them

#
%math_0:_{statistic_mine_block:grass_block}+{statistic_mine_block:stone}+{statistic_mine_block:oak_log}+{statistic_mine_block:oak_leaves}%```
#

or something like that

#

idk if I used the correct material names

errant iron
#

damn blitz knows what im talking about

#

translator

austere hawk
#

m

#

hmm

#

How can i get all the blocks in 1 area

turbid tide
#

that you can't with PAPI

austere hawk
#

ugh

#

is there a way i can like define the most popular blocks

#

dn the ones i haven’t a

#

just get added on, even if it isnt exact

#

????

austere hawk
#

*other way round

austere hawk
#

%math_0:_{statistic_mine_block}/2%

#

?

austere hawk
#

wahts divide 2

turbid tide
#

ugh /2

turbid tide
austere hawk
#

Ok I got it too work

austere hawk
#

&7%math_0:_{statistic_mine_block}/2%"

#

That actually all works

#

Leaves cout as 1 now

#

Blocks coutna s 1

#

Yeah im good

#

Ty

#

does papi work with essentials x

turbid tide
#

no it does not

#

you can't use PAPI placeholders in essentials. Tho there are some workarounds like using ChatInjector (plugin)

zenith pebble
turbid tide
#

actually I think his DMs are blocked

#

@balmy marten when you wake up can you help this man out? ^

austere hawk
#

can i get the documentation for time

#

if that’s a thing

turbid tide
#

what time?

viral knot
junior musk
#

?player

tender vaporBOT
zenith pebble
#

?help

tender vaporBOT
tawdry saddle
#

Caused by: java.lang.ExceptionInInitializerError

#

after i use intellij to build my plugin , it has a lot errors

#

why

#

Caused by: java.lang.NullPointerException: Cannot invoke "network.chrisrak.Core.getDescription()" because "network.chrisrak.Core.instance" is null

#

also this one

#

public static Core instance;
public static Core instance() { return instance; }

errant iron
#

did you ever instantiate the instance variable?

tawdry saddle
#

what do you mean instantiate instance veriable

#

instance = this;

#

like this?

vivid sparrow
#

Yes

tawdry saddle
#

it works now , thx

tawdry saddle
#

Cannot resolve symbol 'paramBlockBreakEvent'

#

LOL why

#

i want to check if player break block and i change my placeholder

silver minnow
tawdry saddle
#

oh ok

silver minnow
#

a lot of devs dont check this channel

tawdry saddle
#

thx

austere hawk
#

Hello i can't use papi with chestcommand 😦

turbid tide
finite locust
#

Hey i'm curious, would it be possible to make a FactionsUUID expansion? I think it could be awesome because the actual factions expansions didn't get an update since 2018, same as the real faction plugin made by Cayorion

turbid tide
#

yo @warm topaz did anyone update the expansion or was it never updated?

pearl sinew
#

Hey, I'm from a company looking into sponsoring this plugin, if a relevant person could DM me in due course, that'd be appreciated 🙂 Thanks

warm topaz
#

someone else updates FUUID i think

turbid tide
#

huh can't find it

warm topaz
#

nor can i

finite locust
#

Pog, could it be possible to update it please? Because it isn't working at the moment

turbid tide
#

Well we thought it was updated but I can't even find the original source so it might not even be Open Source. So no one is able to update it

finite locust
#

Oof, So I guess we will need to wait a answer from a ADM?

warm topaz
#

wait is this mcore factions or different?

turbid tide
#

fuuid

finite locust
#

FactionsUUID is a different one

#

The actual factions expansion has been made for Mcore

#

But Mcore didn't get an update since 2018

warm topaz
#

i have the updated version of that one fingerguns

#

but no fuuid then

turbid tide
#

bcz I don't think its on the ecloud is it?

finite locust
#

I don't have any expansion for Fuuid, I was asking if it would be possible to create one! (I'm pretty sorry if my question wasn't clear enough, english isn't my primary language )

#

Because Mcore Factions doesn't work well on 1.16.5 since he didn't get any update

turbid tide
#

wait but are you using MCore or FactionsUuid?

finite locust
#

FactionsUuid

turbid tide
#

you'll have to contact the current developer to update it if it doesn't work

finite locust
#

It is, do you know where I could find every % of the plugin?

warm topaz
finite locust
#

Thank you very much guys!

#

Sorry for the disturbing, I wish you all a nice day

turbid tide
#

no problem 👍

hexed current
#

hello, the name of my item is "Custom", but the result is equal to "NO"
%checkitem_nameequals:Custom%

#

where is my problem?

austere hawk
#

Why i can't use chestcommands ? with papi 😦

tender vaporBOT
austere hawk
#

sorry

drifting nimbus
#

actually no clue

subtle patrol
#

hi there it seems that papi and buycraft are having some issue?

[18:45:45] [Craft Scheduler Thread - 47 - PlaceholderAPI/WARN]: [PlaceholderAPI] Plugin PlaceholderAPI v2.10.9 generated an exception while executing task 1694
java.lang.NullPointerException: null
    at it.alexdev_.buycraftapi.FileManager.FileManager.containsSection(FileManager.java:303) ~[?:?]
    at it.alexdev_.buycraftapi.FileManager.FileManager.calcCurrentMonth(FileManager.java:289) ~[?:?]
    at it.alexdev_.buycraftapi.Tasks.Tasks$5.run(Tasks.java:81) ~[?:?]
    at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:99) ~[patched_1.16.5.jar:git-Tuinity-"06ce05b"]
    at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:58) ~[patched_1.16.5.jar:git-Tuinity-"06ce05b"]
    at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.16.5.jar:git-Tuinity-"06ce05b"]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_282]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_282]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_282]```
trim mist
#

Send that to the developer of Buyecraft.

silver minnow
#

BuyCraft*

austere hawk
#

How do i get custom placeholders? that are not in the wiki?

#

like:

#

Placeholder
Description
%cp-player-displayname%
Players Display Name
%cp-player-name%
Players Name
%cp-player-x%
Players X Position
%cp-player-y%
Players Y Position
%cp-player-z%
Players Z Position
%cp-player-input%
The player will be asked to enter input in the chat to determine what the placeholder will be changed to. Using this placeholder multiple times per item will duplicate the input per item.
%cp-player-world%
World name the player is located
%cp-player-balance%
Players Balance (needs an economy & Vault)
%cp-player-online-1-find%
You can change the number 1, to any number, it will check server slots and find the player in that slot. If you are the only one online and use the number 1, It will show up as yourself. If you then make it 2, it will show offline, since there is only one player on the server.

silver minnow
#

uh

silver minnow
austere hawk
#

how tho?

#

Do i need to search each plugin that has those?

silver minnow
#

wdym

austere hawk
#

like in the wiki

silver minnow
#

the wiki doesn't have everything

austere hawk
#

yes

silver minnow
#

%player-name% exists

#

%player_displayname% also exists

#

same with vault balanace

#

and world too

#

%player_world%

austere hawk
#

Ok ill try

#

thx

silver minnow
#

placeholders dont appear from thin air :p

#

people have to code them

austere hawk
#

😄 ok

silver minnow
#

@austere hawk ^

#

theres %player_x%, along with y and z

austere hawk
#

Ok

sour igloo
#

Hi, I neeed help with Mcmmo plugin. I need placeholders for top players per skill, because i want to make top hologram on spawn. Thank yu and best regards

random wadi
#

Is there any way to change a placeholder name?

#

For example I'm using a factions plugin that shows their clan, and I want to put brackets around their name

#

And when they're not in a faction, the brackets are still there

#

(I'm using tab)

smoky spoke
#

is [precison:0] broken?

errant iron
#

you need to do %math_0-----% instead

smoky spoke
#

ok

smoky spoke
errant iron
#

%math_0_2+1%

random wadi
#

How do I use StringUtils.replace

random wadi
#

I'm new to this, how would I change a placeholder

errant iron
#

are you implementing placeholderapi in your plugin?

random wadi
#

no

austere hawk
#

is there a placeholder i can use to add the player who has opened a menu made in deluxe menu's head?

random wadi
#

I want to change a placeholder

#

In an existing plugin

austere hawk
#

@errant iron

#

is there a placeholder i can use to add the player who has opened a menu made in deluxe menu's head?

errant iron
austere hawk
#

also a time played placeholder?

errant iron
#

What are you trying to do, like big picture?

random wadi
errant iron
#

What are you trying to do? Is this in a plugin? Or are you trying to modify a placeholder after the fact in like TAB or something

random wadi
#

I'm trying to modify a placeholder

#

For example %faction_name% turns out as Cool
When I want %faction_name% to turn out as [Cool]

(Cool is an example of someone setting their faction name)

errant iron
#

Is this in a plugin?

random wadi
#

Yes

errant iron
#

like, you're editing java code?

random wadi
#

I don't know what I'm doing, I'm just trying to modify a placeholder to have a different outcome

errant iron
#

I need to understand the context

#

Is this is a config.yml of a tab editing plugin or something?

#

or are you making another plugin or extension that uses a placeholder

random wadi
#

No, it's part of PlaceholderAPI

#

Let me show you one sec

errant iron
#

In what context

#

Like what are you doing to edit it

#

java? config.yml? chat?

random wadi
#

Java

errant iron
#

oh just modify the string wdym

random wadi
#

Where can I modify it at

errant iron
#

huh

#

are you making your own plugin/extension?

#

that uses another placeholder?

random wadi
#

I just want to change a placeholder that already belongs to another plugin

errant iron
#

you can't do that without modifying the source code

#

which you could do

random wadi
#

How would I do that

errant iron
#

but I'm saying there's probably an easier way than to actually modify the plugin

#

do you know how to code?

random wadi
#

I know a little bit, and if I don't; I know a friend who knows Java and has helped me a bit

austere hawk
#

yo star

#

could u help me out with something?

#

is there a placeholder i can use to add the player who has opened a menu made in deluxe menu's head?

#

and a time played placeholder

errant iron
#

If someone knew, they'd answer. Maybe wait for Blitz

austere hawk
#

ok

errant iron
#

And the second is using the stats expansion

austere hawk
#

how would i do that?

errant iron
austere hawk
#

thanks

errant iron
random wadi
#

I'm confused on how to do this

errant iron
#

oh yeah that's a good point, you can just write a little javascript to modify that as you please

random wadi
#

Do I make it a .jar after I paste and modify it?

errant iron
#

uh

#

if you just unzipped, edited, and rezipped a jar I think it'd still work

#

but that's real ghetto

hollow pollen
#

Can you somehow chain one placeholder with another?

austere hawk
#

what is the placeholder for like the player that has opened the menu in deluxe menus

errant iron
#

I mean afaik jetboi, %player% will give you the current player which would be the one who opened the menu

errant iron
hollow pollen
#

mmm I just realized that what I'm looking for is more focused on the javscript extension, so I don't know if this is the right place to ask

errant iron
#

i mean yeah why not. you wanna combine two placeholders with a javascript extension?

hollow pollen
#

ok in simple words I would like to use certain placeholders, to use them internal to other placeholders in the style of any function, but I am not sure if it is possible

errant iron
#

those were not simple words

#

that explanation tells me nothing lol

#

got an example?

hollow pollen
#

a silly example would be that I have a placeholder that returns the power of a number (%javascript_Pow_2,3%) and another that returns the sum of 2 numbers (%javascript_sum _?, 4%), and I would be willing to do the operation ( 2 ^ 3 + 4), I know that I can make a placeholder for that specific case but I would rather avoid having to create a placeholder for each specific one that I need.

errant iron
#

oh I see, use placeholders as functions

hollow pollen
#

I do not demand that it exists because I understand the complexity but I would like to know if the way exists

errant iron
#

ummm, as far as I know composition is limited to only one placeholder at the top level

#

but that would indeed be very cool

hollow pollen
#

I know, with something like that I could do wonders

#

but hey, I just wanted to know that, thank you very much, you are a love of person ♥

errant iron
#

yeah no problem man, good luck in your coding endeavors!

lament burrow
#

um hi, not working mi / papi parse me% world_players_mapa% don't know what it will be?

errant iron
#

Did you /papi ecloud download world then /papi reload?

lament burrow
#

yeah

#

but still doesnt work

errant iron
#

What does it put in chat?

lament burrow
#

i send screen

#

Failed to find expansion named: world

errant iron
#

Okay then you didn't download the world expansion

#

try downloading it from there

#

and putting it in your placeholderapi folder manually

lament burrow
#

no i dowloand it

errant iron
#

Well obviously not if it can't find that expansion

lament burrow
#

i send you screen to dm

errant iron
#

?imgur

tender vaporBOT
lament burrow
errant iron
#

Try deleting the Expansion-world.jar and restarting the server

lament burrow
#

ok

#

still didnt work:/

sour igloo
#

What are placeholders for top players in mining skills on mcmmo for holograms? Thank you

austere hawk
#

what is this placeholder ? %player_ping%

sour igloo
rare lily
lament burrow
rare lily
#

Try parse %world_players_$%

sour igloo
lament burrow
rare lily
#

I mean, just try parsing it as a test

silver minnow
#

well you can get console spam fix, but you shouldn't really be analyzing logs anyways, as that could be useful info 🤷

hexed current
#

hi, some way to remove decimals from variable %math% results??

turbid tide
#

yeah

#

%math_0:_MATH-HERE%

#

add the _0: part

hexed current
#

works thanks! ❤️

upbeat musk
#

Hey what's wrong with the onPlaceholderRequest method? It won't let me use it because it is marked for removal

#

How do I use the new API?

turbid tide
#

I think its just best to use onRequest

#

It can do all that onPlaceholderRequest can and more

errant iron
#

Wait it's deprecated

#

How come nobody updates the docs

turbid tide
#

why don't you?

#

its opened to PRs

errant iron
#

Cause I obviously didn't know that lmao

turbid tide
#

well now you know

#

👍

upbeat musk
turbid tide
#

well you can get that from an offline player

#

that's what I mean

#

you can get the Player from OfflinePlayer

upbeat musk
#

so instead of onPlaceholderRequest I use onRequest?

turbid tide
#

yeah

upbeat musk
#

I'll try that

turbid tide
#

and you just get the player from the offline player and check if its null or not

#

I think it can be null. not surey

#

you'll have to check the spigot javadocs

#

actually wait

#

d;spigot OfflinePlayer#getPlayer

ionic fractalBOT
turbid tide
#

yeah it can be null

upbeat musk
#

Nice, thanks\

wide wolf
#

hello, im trying to setup leaderboard for ajparkour and placeholders donest work at all... what am i doing wrong... i write everything corectly...

austere hawk
#

Hey, so I'm trying to make a server selector plugin and so far it's gone well so far.

So, I'm trying to use PlaceholderAPI in my gui which works as expected however this message keeps getting sent every so often in chat, I was wondering if anyone knows how or how I'm able to disable it https://prnt.sc/11cwlxk

vital linden
#

i have a question about papi and if it supports scoreboard revision

#

because i used it and when i put %vault_eco_balance% it does not show that on the scoreboard it just shows it as "%vault_eco_balance%"

errant iron
#

Papi doesn't affect the scoreboard by default, you'd need a plugin that modifies it that works with PAPI for that

vital linden
#

ik i have the vault one

#

and i did /papi reload

errant iron
#

No you need a plugin that modifies the scoreboard

vital linden
#

oh

#

which one is that?

errant iron
#

Uh there are many options

brisk coral
#

KiteBoard

vital linden
#

whats the best one in you're oppinion?

#

ok

#

so is that one that creates a scoreboard?

#

so should i replace scoreboard revision with this?

errant iron
#

Oh you already have a scoreboard plugin?

vital linden
#

wait KiteBoard costs money?

vital linden
errant iron
#

Well yeah it's an excellent plugin

#

You'd need to reload that scoreboard or restart the server for it to show up

vital linden
#

i have restarted my server many times

errant iron
#

?paste

tender vaporBOT
errant iron
#

send your config

vital linden
#

ok

#

papi config or scoreboard-r one?

errant iron
#

scoreboard

vital linden
#
#  ____  ____  ____  ____  _____ ____  ____  ____  ____  ____
# / ___\/   _\/  _ \/  __\/  __//  _ \/  _ \/  _ \/  __\/  _ \
# |    \|  /  | / \||  \/||  \  | | //| / \|| / \||  \/|| | \|
# \___ ||  \_ | \_/||    /|  /_ | |_\\| \_/|| |-|||    /| |_/|
# \____/\____/\____/\_/\_\\____\\____/\____/\_/ \|\_/\_\\____/
#
# Scoreboard-r by Rien Bijl
# rep: github : RienBijl/Scoreboard-revision
# v: R4 1.1 RELEASE

# Do not edit! The plugin uses this to determine if the configuration is suitable
config_version: 1

settings:
  # The driver is the Scoreboard implementation used to display the user
  # Old drivers will from now on remain supported so that switching back to
  # an older (perhaps more stable) version is easy.
  driver: SCOREBOARD_DRIVER_V1
  # Should we check updates? Caution! Disabling this is not recommended
  # you might miss awesome updates *wink*
  check-updates: true

# In what worlds should we disable scoreboard?
disabled-worlds:
  - 'non_existant_world'

board:
  title:
    interval: 3
    lines:
      - '&6&lP'
      - '&6&lP'
      - '&6&lPE'
      - '&6&lPE'
      - '&6&lPEE'
      - '&6&lPEE'
      - '&6&lPE'
      - '&6&lPE'
      - '&6&lP'
      - '&6&lP'
      - '&6&l'
      - '&6&l'
  rows:
    1:
      interval: 5
      lines:
        - '&c------------------------'
        - '&4------------------------'
    2:
      interval: 80
      lines:
        - '&6%vault_eco_balance%'
#

ok there

errant iron
#

huh

vital linden
#

that is the scoreboard config

errant iron
#

do /papi ecloud list installed

vital linden
#

it says 1? luckperms?

errant iron
#

oh

#

then you don't have the vault expansion downloaded

vital linden
#

in the folder i have both?

errant iron
#

you installed it manually?

#

/papi list

vital linden
#

it says 1?

#

luckpemrs?

vital linden
errant iron
#

okay so you don't have the vault expansion

#

try deleting it from the folder and downloading it manually

vital linden
#

ok

#

i put it in the folder

#

then i do /papi reload then it says no new expansions where registerd?

errant iron
#

which folder did you put it in?

vital linden
#

expansions

#

with luck perms

#

wait

#

luck perms is not in the folder?

#

oh god i bm deleated the luck perms

#

but im not using that one rn

errant iron
#

yeah afaik luckperms is integrated in the plugin

vital linden
#

hmm ok

errant iron
#

oh maybe there is

#

okay so I have no clue why it's not registering your thing

vital linden
#

i did /papi register "name of file"

#

and it says that it does not exit

#

exist*

errant iron
#

and it is in /plugins/PlaceholderAPI/expansions/

vital linden
#

yes

errant iron
#

are you on linux?

vital linden
#

mac

errant iron
#

the server is?

vital linden
#

on my pc

#

its hosted on my pc

errant iron
#

on your mac?

vital linden
#

yes

errant iron
#

hmmm

vital linden
#

i tried deleting the plugin and reinstalling it

#

i tried installing older versions

#

but it still does not work

errant iron
#

@turbid tide you got any ideas

tender vaporBOT
errant iron
#

nice barry

turbid tide
#

Imagine pinging me...

#

let me sleep

errant iron
turbid tide
#

ok and?

errant iron
#

i presumed you were awake?

turbid tide
#

what if I don't want to help? xD

#

why are you harassing me

#

I'm going to report you to the helpchat police

errant iron
#

oh nu

#

monkafbi <- cube

turbid tide
#

I'll read this later

#

helping someone else rn

errant iron
#

ah see I knew it

#

always a helpful boi

vital linden
#

nice

turbid tide
#

time to read fingerguns

turbid tide
vital linden
#

il try that now

#

oh

#

what

#

yes

#

yes i have

#

it just says %vault_eco_balance%

turbid tide
#

/papi dump please

#

and send over the link it generates

turbid tide
vital linden
#

this is the link

errant iron
#

see blitz! no expansions registered or in the directory!

#

that's a useful command tho ima write that down

turbid tide
#

of course the expansion is not registered

vital linden
#

ik

#

i tried to get it

turbid tide
#

and?

errant iron
#

omg nice

vital linden
#

oh yes

#

i tried to get it

#

i did /papi reload

#

but no new expansions

errant iron
#

you don't have the actual plugin for vault??

vital linden
#

what??

#

i do?

turbid tide
#

download this

errant iron
#

it ain't in the list

turbid tide
#

put it in your plugin folders

#

and restart the server

#

restart it

vital linden
#

oh my god

#

im stupid af

#

ok il get it

#

i did them

#

and now it doesnt work?

#

oh yea lemme get the vault papi

#

OMG FINALY

#

TY Thank You Blitz!

errant iron
#

okay so I've learned to never make any assumptions

#

I presumed that you'd have the plugin you want a placeholder for installed smh

vital linden
#

i have learned that i am stupid

#

very cool

turbid tide
vital linden
#

yes

turbid tide
vital linden
#

xD

austere hawk
prisma pelican
#

Where can I find the list of the Placeholders for VoteParty?

turbid tide
#

=wiki voteparty

tender vaporBOT
turbid tide
#

on the wiki

prisma pelican
#

And thanks for the link!

rapid atlas
#

I feel like I'm overlooking something obvious here. I have health, hunger, and exp level all showing up how I want, but I can't seem to figure out what placeholder to use to get output like the "armor bar" in the vanilla client UI? (Not a bar, just the current numerical value of all armor.)

turbid tide
#

that's because there is none

rapid atlas
#

Then that would explain why I can't find it anywhere.

turbid tide
#

you can make a javascript placeholder to calculate it if you want

rapid atlas
#

Thanks!

turbid tide
#

It requires some javascript skills but probably not that much

rapid atlas
#

Not much, that's fairly straightforward. Thanks, again.

hexed current
#

hi, some way for %checkitem% to only work in HAND??

#

in OFFHAND no

tepid stone
#

Anyone know how I can make a placeholder that checks if another placeholder is giving a certain output, and if true use one placeholder and if false use another placeholder?

tepid stone
#

I've been looking through that today and im very very lost. I see you can easily check for permissions but I cant find anything that lets you check for a placeholder.

turbid tide
#

you just put it in a string

#

?js-tag

tender vaporBOT
turbid tide
#

for example this ^

tepid stone
#

Oh I see! That helps loads

#

thank you

#

So i have the java script addon installed, yet I just realised, it is not working. /jsexpansion does not work and non of the community scripts/tutorial scripts work. I have the latest ver of papi and restarted after installing the javascript from via ecloud command.

turbid tide
#

/papi dump and send over the link it generates

tepid stone
turbid tide
#

delete them both

#

and do /papi ecloud download JavaScript then /papi reload

tepid stone
#

Ah rip thank you

ancient linden
#

hi, how can i fix it?
[PlaceholderAPI] skript is attempting to register placeholders via a PlaceholderHook class which is no longer supported!

turbid tide
warm plover
#

Does the progress bar placeholder have an option to have like a multiple of 10 show?

#

Or just a max value..?

#

An example is I have a vote progress placeholder but I don't want it to go to a max value, I want it to be a multiple of 10

#

so if you have 10, it resets and goes to 20 as the max

ancient linden
#

okay so how to fix this one? xD

  • '%skript_ancient::Fovers%' > returns 5 (correctly)
  • '%skript_ancient::player%' > returns <none>
tepid stone
#

So ive tried running my script but it just returns a blank space in chat. Would appreciate if I could get a point in the right direction https://pastebin.com/BRqH8k0J (3 ones ive tired)

#

wait

#

i got it working

#

all good, thanks for the earlier help!

tall hemlock
#

hi is there any way to display %luckperms_prefix% but for other player? i mean i can display prefix of someone else

fossil remnant
tender vaporBOT
ancient linden
#
  • '%skript_ancient::Fovers%' > Returns correct number
  • '%skript_ancient::player%' > Rerurns <none>
#

how to fix it?

tepid stone
#

Anyone now how to set a Relational Placeholders using java script extension? If its even possible. Need a relational placeholder for dchat prefix...

fickle tide
#

can you create custom variable with JavaScript Papi, i mean something like a shop but i would create a global fund like if a player purchases 10 diamonds that money is sent to "Diamond Fund" to make something similar like voting for mayor on Hypixel Skyblock or like in Prototype also on hypixel, like players can spend their money towards voting on next update for example

vast axle
#

Why %player_colored_ping% make the number red when ping is low, and green when is high?

turbid tide
#

do /papi info player please and tell me the version

vast axle
#

1.8.0

turbid tide
#

that's strange. 1.8.0 was supposed to fix that

#
        defaults.put("ping_color.high", "&c");
        defaults.put("ping_color.medium", "&e");
        defaults.put("ping_color.low", "&a");```
#

yeah even the code

vast axle
#

Mhm

turbid tide
#

is correct

#

ohhh

#

go to config.yml

#

in PAPI

#

I think there's an option

vast axle
#

ok wait

#

oh yes

#

it's here

#

low: '&c' 😂

#

why

turbid tide
#

it was broken before and it just got fixed

#

so by default it was switched

vast axle
#

thank you!

turbid tide
#

no problem

sleek raven
#

Hello, What is the version of PAPI for minecraft 1.12.2 ?

turbid tide
tepid stone
turbid tide
#

and then you can use the relational expansion

#

instead

#

I think

hexed current
#

hi, is there a placeholder for the remaining storm time? 🤔

turbid tide
hexed current
#

ok thank you 😆

tepid stone
turbid tide
#

have you tried the actual relation expansion?

tepid stone
turbid tide
#

the RelCon one?

tepid stone
#

Lemme check again

turbid tide
#

bcz I don't think the javascript expansion is actually relational

#

well actually I know for a fact it is not

tepid stone
#

Ah i tried using parse other, I'll give this one a try but will have to try tomorrow.

#

Ahh ok

#

So if this doesn't work it won't be possible unless I get a plugin that specifically does relational prefixs I guess

hexed current
#

and a placeholder that represents some kind of stopwatch or counter?

turbid tide
turbid tide
#

otherwise you'll need to google StopWatch plugin or something

#

if you want like /stopwatch 1h

#

or something

hexed current
#

ok I'll see that, thanks for your help reversed_fingerguns

keen mica
#

Does parseother not work for offline players?

desert trench
turbid tide
#

I was to late

#

xD

sharp jewel
#

hello everyone, I am looking for a way to Check slots of the "CheckItem" extension
translated by Google

tall hemlock
#

hi is there any way to display %luckperms_prefix% but for other player? i mean i can display prefix of someone else

frigid spade
#

hi
i want to do a progress bar with the placeholder but it doesnt work properly
because the underscore in "oak_log", the placeholder dont understand and dont work
How can i do to use item name with underscore in my placeholder

my placeholder :
%progressbar{rankup_requirement_item#oak_log_percent_done}_c:&a|_p:&a|_r:&c|_l:20_m:100_fullbar:&aComplet !%&

frigid spade
#

If someone know how to declare my oak log in this placeholder

upbeat holly
outer steeple
#

Maybe a stupid question, but what is the placeholder again for the amount of people online atm

outer steeple
#

Thanks 🙂

junior musk
junior musk
frigid spade
junior musk
#

uh

#

well

#

try to do /papi parse me %rankup_requirement_item#oak_log_percent_done%

#

what does it show?

frigid spade
#

ok few seconds ^^

#

its juste create blank x)

junior musk
#

what's your Rankup plugin?

tall hemlock
#

nice thanks 🙂

frigid spade
#

Rankup3

junior musk
junior musk
frigid spade
#

This placeholder work for all items who does not have any underscore in name

frigid spade
junior musk
#

uh

#

can you try without the _percent_done at the end?

frigid spade
#

the command ?

#

i have a blank space in chat everytime

junior musk
#

then try to contact the author again and tell him that you can't get the placeholder to work, I don't think PlaceholderAPI is at fault since it's his placeholders, idk, but try to ask him

frigid spade
#

ok thank you so much for your help

quiet mulch
#

hi, I want to make my plugin install "bungeecord" from the placeholders, is there a method to do this and how can I check if its already installed.

#

I know I could technically just run the command /papi ecloud download bungeecord but im wondering if there is a built in way to do it

junior musk
wet basinBOT
#

@rare lily Unknown expansion.

rare lily
#

Uh.. ok

#

No expansion for kotlin in public

wet basinBOT
#

@rare lily Unknown expansion.

gentle osprey
#

what do i use if i want to display a players /nick as currently im using %player%

turbid tide
gentle osprey
#

perfect thanks

#

didnt work

turbid tide
#

essentials /nick?

gentle osprey
#

do i have an ecloud to install to make it work?

#

yeah essential nick

#

im making it so when player ranksup it broadcast there name or nick