#placeholder-api
1 messages · Page 114 of 1
How do i see who has the most kills on the statistic?
Or is there a placeholder for the most kills?
I really need it for kitpvp-payouts etc etc
@turbid tide
@austere hawk LeaderHeads allows you to make LeaderBoards from Placeholders
Isn't there a placeholder for the #1, #2, #3, #4 & #5 most kills?
I would like to have it in a hologram
not in the statistic expansion
as I said LeaderHeads allows you to create them tho
so if you have some $$ and you rly want a top kills hologram then you'll need to buy it
and where can i buy it?
this is the link ^
But if i want it in an hologram
it will make placeholders for you
so you can use those placeholders in holograms
or scoreboards
or wherever you want and accepts placeholders
So if i buy it i can set a leaderboard of kills in an hologram with the names etc etc
that's a good question. Idk for sure but I think so but better ask the plugin developer first
idk if it actually shows names as well
Okay, thanks.
this is his discord: Robin#7385
ty
Good afternoon guys
after creating a faction, a placeholder is giving me an internal error
nothing happens if i dont have a faction, it works perfectly
https://hasteb.in/qadujiwi.shell
right can you paste the javascript ?
// %javascript_checaclan_<opcao>%
// nome, membros
var opcao;
var hasFac = "%factions_faction_name%";
if ( args.length === 1 ) {
opcao = args[0];
if(hasFac != 'Sem Facção'){
switch(opcao){
case 'nome':
return ' &8&l» &bTag&7:%factions_faction_tag%&r';
case 'membros':
return ' &8&l» &bMembros&7: &f%factions_faction_members_online%&7/&f%factions_faction_members_count%';
}
} else {
switch(opcao){
case 'nome':
return ' &8&l» &cSem facção';
case 'membros':
return ' ';
}
}
}
}
checafac();```
I'm assuming it has something to do with the factions plugin or the factions expansion
😥
What faction plugin are you using?
@cunning elk
Also is it outdated? Because the issue you’re experiencing is due to a Method being nonexistent in your factions plugin
fork of MCore Factions?
yeah I found the plugin
but they don't have their own extension so maybe they changed something that broke the expansion
for that fork
What version of PAPI should I use for a 1.14.2 server?
latest
1.8.8
1.12.2
1.13.2
1.14.4
1.15.2
v2.10.6 - Latest
v2.10.6 - Latest
v2.10.6 - Latest
v2.10.6 - Latest
v2.10.6 - Latest
elaborate?
i use serverNpc
and i have the pinger placeholder with it all injected etc and it dont work
Run those commands
and test the placeholder with /papi parse me <placeholder>
@forest tusk
does servernpc support papi placeholders?
they have a discord
I mean.. I want to add placeholder in the actionbar
That detects all armor that you been wearing
Yes
So mmocore use JavaScript 0.0
ah
probably cost like $2 for it to be made by someone
So theres no PlaceHolder?
mmocore is something else x)
not what i’m aware of
:l
your looking for a very specific thing
probably cost like $2 for it to be made by someone
I can try for free ¯_(ツ)_/¯
👍
Make a placeholder for it xD
priorities
fak priorities
😂
k, now I just need to get out of my bed and turn on my pc x)
0.0
😂👍
it's 1:10pm and I'm still in my bed 😅
12:10 and same for me
I got problems
7:10pm 0.0
Can you parse through bungee servers? I want to get the vanished player count on another server.
no
blunt
Hi there
[PlaceholderAPI] Plugin PlaceholderAPI v2.10.6 generated an exception while executing task 79256
What does this mean
its too big
i hve
some of them are from custom plugins
one of them is vault
and have downloaded and reloaded the plugin
whats ur server version?
i used papi reload and also the plugman reload function and after using plugman, it stopped registering everything
1.15.2
i use 2.10.6 papi
dont use plugman
ok how do i rectify the issue xD
/plugman unload Plugman
xd
Hey guys,does placeholderapi support mmocore?
It's the other way around
Holograms, CMI, HolographicDisplays for indicators
MythicMobs for new drop table items
MMOItems for many new statistics, leveling restrictions, crafting options.. (more info on the wiki)
Vault for economy support (physical currencies)
PlaceholderAPI for placeholders
Citizens for quest objectives```
looks like it
simple google search on its plugin page 👍
Yea well cant find anything
https://github.com/mmopluginteam/mmocore/wiki/Placeholders placeholders are here
Yea I saw this {placeholderapi_mmocore_...} but I don't know what placeholders can be used
like all the placeholder on that page,can be used with this {placeholderapi_mmocore_...}?
ex: {placeholderapi_mmocore_mana}?
are u trying to use it on an mvdw plugin? (such as featherboard)
Im using it with titlemanager
there is no need for {placeholderapi_blah} then
as that is used in mvdw plugins
just use the %% placeholders and it should work fine
And I assume the dev of the plugin implements the placeholders,or can you guys do it too?
the placeholders are built into the plugin
oh
So if I want some sort of a custom placeholder I need to ask the dev of that plugin
placeholderapi is an api, it is just an interface for developers to use to get information from their plugin so it can be used anywhere else
if u want a custom placeholder, u will have to ask the dev
👍
@balmy moth
/papi ecloud download Javascript
/papi ecloud download Armor
/papi reload
go into your PlaceholderAPI folder in your plugins folder
open javascript_placeholders.yml
add this at the bottom:
armorbar:
file: armorbar.js
go in the javascripts folder and create a file called armorbar.js and add this https://paste.helpch.at/udikosisex.js
And then /papi reload
then you can use %javascript_armorbar%
ask away
PlaceholderAPI doesn't work for me in PaperSpigot 1.14.4
define doesnt work
I throw error in the console with all the plugins that have PAPI support
doesn't load on server start? a placeholder doesn't work?
could you send a startup log please?
?paste
?startuplog
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.
^
Can I send it to you by Hastebin?
send it here
=paste
Please use a paste service to share configs, errors, code and long logs.
• HelpChat Paste
For example, I use DeluxeChat, and when writing I throw this error
https://hastebin.com/acagotajuw.pl
ok considering this is DChat I'm going to have to ask you to go to #spigot-linking and follow the steps in there before I can give anymore support
It is not just DC, there are plugins that are not clip and throw many synchronization errors with PAPI
I passed the DC because it is the last error that comes out in the console
It happens to me with KiteBoard too, the synchronization theme
yeah I know but I was told that when someone says he owns one of the premium plugins I need to wait for them to link to give help
but just a tip. Update papi if you are not on 2.10.6
dk if this will fix it just a tip
xD
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.
If you follow that, I'll read it over and can probably tell you why 😄
?paste
Let me see that the error of other plugins comes out in order to send the complete log
he left 👀
Lmao.
||leaker alert||
i need help with placeholder api
so basically
how do i set it so the placeholders would refresh once in a while?
where do you want to set that?
whenever you use it it should refresh as long as where you use it refreshes as well
it doesnt for me for some reason
where are you trying to use them?
In a server with different worlds so like I want to show the number of players in a world form the hub
hologram
in scoreboard?
its just stuck at 0
what plugin are you using for holograms?
holographicdisplays
HolographicExtension has some tags that you add at the beggining of a line which refreshes the line based on the tag you added
Versions 1.10.0 and above:
{fastest} - 0.1 seconds.
{fast} - 0.5 seconds
{medium} - 1 seconds
{slow} - 5 seconds
{slowest} - 10 seconds.
Ohh ok
"To make sure the placeholders update you will need to add refresh holders." How do i do this?
okay so do i put it in placeholderapi?
no
ohhhhh i get it now
add it at the begining of the line
ok
in Holograms
ty
Hello
I made a plugin
in this one i need to get a value
Here's my hook
to placeholder
it works however it doesn't update the informations
(I know that EzPlaceholder is depreceated)
How i'm supposed to do then ?
Use expansion
Thx ^^
Are you running the server on a CraftBukkit jar?
what's your PAPI version?
Hi, how can i upload a expansion to ecloud of PAPI?
yeah but you can't upload it because you can't make an account pretty sure
you had to make a request somewhere and wait for an admin to review it
hmm
you changed anything in config/
try reinstalling it
and if possible remove the entire PAPI folder
like download a new jar
ugh
@delicate pebble where'd you download it from? spigot?
pm me your placeholderapi jar please
the name of the jar you just sent doesn't match the one in the error
"PlaceholderAPI.jar" vs "PlaceholderAPI-2.10.6_1.jar"
odd
confirm that you've only got one placeholderapi jar in your plugins folder
send me your server jar please, or, isolate the server & placeholderapi on your own
hello guys!
I want to create a global cooldown that last 24 hours
how can i do that?
cooldown for what exactly?
just a cooldown because in 24hours is a new update of a server
i just want a simple cooldown
for all players in a hologram
using HolographicDisplay
%server_countdown_<SimpleDateFormat>_<ActualDateAndTimeBasedOnSDFSpecified>%
it will go from the time of the server until the time you set
%server_countdown_dd.MM.yyyy HH:mm_10.07.2020 06:00%
you can't rly
the time of the server
so
%server_countdown_<SimpleDateFormat>_<ActualDateAndTimeBasedOnSDFSpecified>%
my server time rn is 06:00
ok i will see bro!
and its 09.07.2020
%server_countdown_dd.MM.yyyy HH:mm_10.07.2020 06:00%
so there will be a 24 hours countdown
but in dd..MM.yyy i set the cooldown?
that's just for it to know until it counts
it doesn't know it counts until tomorrow you know
its a computer
if you just give it the hour it will take 1970 January 01
oh
buts not working
%server_countdown_dd.MM.yyyy HH:mm_10.07.2020 06:00%
@granite galleon this
oh wait
nvm I forgot
that doesn't work with HolographicExtension anymore
or still
doesn't work
xD
its a bug
@granite galleon this
@granite galleon that has an space in the middle
its okay?
%server_countdown_dd.MM.yyyy HH:mm_10.07.2020 06:00%
yeah that is fine
its a time format
/papi parse me PLACEHOLDER will work
if you test it
@delicate pebble I can't reproduce the error, one of your other plugins seems to be causing the issue.
but in HD + HE it won't work
hmm I rly can't think of anything else rn
I'll take a quick look on some javascript stuff to see if I can make 1 for this use and I'll ping if I can
yeah but you'll need to set that cooldown for everyone
thats work because it parse start EVery player who clicks
really? thanks!!
%server_countdown_dd.MM.yyyy_01.01.2020%
if i set that in the hd
it will work
i mean
%server_countdown_01.01.2020_01.01.2020%
but those 2 need to match
else it says "Invalid format"
but it will display 0
invalid date
well it won't work
because its wrong
timers are broken in HE
so if it just says invalid format it won't work
%server_countdown_dd.MM.yyyy HH:mm_10.07.2020 06:00%
@granite galleon with this u sent me, it wont even hook
%server_countdown_01.01.2020_01.01.2020%
@granite galleon with this it says invalid date
well yeah
because the first one its an actual countdown
the second one its not
HE breaks every tine you use a timer
not only this coutndown
even if you use luckeperms_time_until_Expire... or %server_time%
all timers are broken in HE
@granite galleon until when exactly do you want the countdown to go?
well 7 days from now
where are you from?
my server is from canada
but I assume you don't want the time to go there?
just set there
to end when the canada time is 00:00 in 7 days?
ye
so you want it until 16.07.2020 00:00 right?
Can i use a placeholder in a math placeholder?
Thanks
@turbid tide Can i workout percentages with this?
@fading sapphire,
Please respect the rules, be patient and don't ping staff members!
yeah
Okay, mind telling me how? Please?
math xD
not rly
They are for me lol
Guessing i can't cap the percentage at 100%?
if a placeholder isnt working correctly whom should i refer to? papi support or the plugin support
usually the developer of the expansion if there is an expansion if not the owner of the plugin
Hi
Help me pla
Pls
{Askyblock_level} not working
Book stats plugin helpme pls
@turbid tide
@obsidian niche,
Please respect the rules, be patient and don't ping staff members!
@obsidian niche where are u trying to use this placeholder?
Is there a way to reset or modify the kill stats from %statistic_player_kills%?
looking for placeholder documentation for player warps https://www.spigotmc.org/resources/⭐-player-warps-⭐-➢-let-your-players-set-warps-1-8-1-16-1.66692/
haven't been able to find any
Are you looking to use papi placeholders in the plugin?
cant find a command to list placeholders of an expansion
can you send a ss of /papi help
ah it's for ecloud
and info should do it, if they added it
which they didn't
so you gotta wait for their support or decompile rip
just a try, what if you did %pw_visits_<warp>%?
or the other way around?
could just keep guessing 🤷♂️
Hi, I have a problem with the Vault extension
I install it per command then reload and it still is'nt installed
The download succeeds and the extension is downloaded to the correct folder
but it does not load
any ideas?
Version: https://i.imgur.com/zzdfxmh.png
anyone know the command to update placeholders?
@austere hawk did u try restarting the server ?
It should update automatically
ok so isn't it showing?
it shows a blank line
@shut lion latest voteparty has internal placeholders, so delete the expansion
how do you delete it
You delete the jar
apparently it's not installed
so why isn't the expansion shown?
%voteparty_counter%
this is the correct one, right?
I don't see a placeholder like that
Hi, I have a problem with the Vault extension
https://i.imgur.com/eLMo3f1.png
I install it per command then reload and it still is'nt installed
The download succeeds and the extension is downloaded to the correct folder
but it does not load
any ideas?
Version: https://i.imgur.com/zzdfxmh.png
Any ideas? (restart does not help)
Do you have vault installed?
solved, was a problem with vault not loading properly. sorry for the inconvinience!
is this how you use progress ? %progress_bar_{statistic_mine_block}_c:&a■_p:&e■_r:&7■_l:10_m:100_fullbar:&aCompleted!%
?tryandsee
👍
using voxelsniper internal database error when attempting to /u [number here]
anyone know a fix?
Would help if ya showed the error, also #general-plugins
oops thought i was in it
I was wondering how to use the placeholder %player_name% inside another placeholder. Is this possible at all?
depends if that other placeholder supports it
I was looking at using the DeluxeTags placeholder: %deluxetags_tag_TAGID and I wanted to use the player's name as the TAGID. So would it be possible to do %deluxetags_tag_%player_name%%
I don't think that placeholder supports placeholder in it
and if it did, it would be {player_name}
then it doesn't support placeholders in it
Its possible to get in other server, the placeholder of other server? (@ me if u response)
you can with plugins like GlobalHolders (or I think it was renamed to something else)
bruh
that site is even banned here x)
as I said, it's premium, and on a site that doesn't seem very good because of the problems it had recently
1 sec I remember seeing another plugin on spigot don't remember the name tho
@dawn cobalt https://www.spigotmc.org/resources/bungeeplaceholderintegration-placeholderapi-bungee.79900/
but just so you know before you use this if you get any errors with this or problems don't come here for help as PAPI doesn't support bungee itself yet
@turbid tide you know how that plugin work? i don't found tutorials about it
nope
never used
it
To use it, just put the latest JAR from here in your BungeeCord plugins folder and the same one again, in your Bukkit, Spigot or Paper plugins folder. The main class you want to use is BungeePlaceholderAPI. It currently only has four methods, but if you want a feature from PlaceholderAPI ported to BungeeCord, just write an issue here.```
seems like you need to write your own plugin to use it
ugh didn't know that
i have the api for online playyers in there and i was working but i switched to pex and now it doesnt
is papi 1.16 out?
Check pins.
Hello guys! Can I count at once 2 or more worlds/bungee server using %server online <world1>,<world2>%/%bungee count <server1>,<server2>%
using math expansion yes
e.g %math_{server_online_world1}+{server_online_world2}% for example
thank you so much!
no problem
Statistics + LeaderHeads
LH is a premium plugin btw
it can make leaderboards (top) for a lot of placeholders
I think i have LH but idk about Statistics
Statistic is a papi expansion
player name and value
Am i allowed to decompile and edit it to make it display name?
Or i can't decompile extensions
Or what?
Expansion
OMG i can not type
you can use the PlaceholderAPI expansion ParseOther to get the display name of the player name from a placeholder
and no you can't decompile it
oof
but you can still use the parseother expansion instead of changing the source code ¯_(ツ)_/¯
hey guys
i wanna tell u something
i love placeholderapi
and i wanna to say thank you
for this great plugin
wrong channel jeah thanks
peace out
I think if i use parseother expansion i can do /profile for offline players right?
Like there is a way to do that?
?tryandsee
Wt is that?
you can't do
that for offline players
I mean some things you can
but not all because most expansions don't support offline players
you can do it for the online players tho
oh I see
I think caching the last parse on sql will be good?
don't rly know. not good at thist things xD
statistics doesnt have any leaderboard placeholders
instead, u can use LeaderHeads plugin
Does %vault_prefix% support offline players?
.
Yup i lagged that's cool
Oof fixed the internet after 1099 years
Hey?
I think it does
@jade flume I think it depends on the underlying groups/permissions plugin
Ultraperms?
?tryandsee
I have this problem that boss plugin and chatcontrolpro are breaking my javascript placeholders
they're preventing them from loading for some reason
why would this be
boss plugin does it too
don't know if there is any fix for this
just boss itself
is there a way to disable the javascript in chc?
no idea. either check the config or contact their support
oh i have
and?
well i made a ticket yesterday on github
that was closed without response and said to post it on their customer service website
posted on their website 8hrs ago
nothing
welp the best you can do is wait for their response. I've not heard of a solution so far
Hello! I currently made this placeholder:
"%luckperms_expiry_time_access.spawn%";
function returnEmpty()
{
return placeholder == "" ? "&cYou don't have" : placeholder;
}
returnEmpty();```
Could someone pleeease help my make so if the placeholder `%luckperms_check_permission_access.spawn%` returns "Yes" then instead of "&cYou don't have" it will return "&aIt is permanent".
I would be way veeery happy if someone could help me
var placeholder =
"%luckperms_expiry_time_access.spawn%";
function returnEmpty()
{
switch (placeholder) {
case "":
return "&cYou don't have";
case "yes":
return "&calt is permanent";
default:
return placeholder;
}
}
returnEmpty();``` try this
omg!!!! how fast, I will update in a sec, thanks in advance!!
I tested it, but the placeholder %luckperms_expiry_time_access.spawn% will never return "Yes", it is just a countdown when you have access.spawn for a time. The placeholder that returns "Yes" is %luckperms_check_permission_access.spawn%
oh I see
my bad
didn't see the permission under
var placeholder2 = "%luckperms_expiry_time_access.spawn%";
var placeholder = "%luckperms_check_permission_access.spawn%"
function returnEmpty()
{
if (placeholder == "yes")
return "&aIt is permanent";
if (placeholder2 != "")
return "&cYou don't have"";
return placeholder2;
}
returnEmpty();``` not pretty but should do the job
I'm getting "Script error" now :((
Yes! I spotted that, tried removing it but that wasn't the problem :((
Oh and also, why (placeholder2 != "") when it is not equal to "" it should return "&cYou don't have"? It should be the opposite I guess, because when %luckperms_expiry_time_access.spawn% returns empty (is equal to "") then it should return "&cYou don't have"
There's a ; missing line 2
hey
Ok I will also fix that
and you removed the default case
its hard when you type in discord xD
x)
default case?
yeah Ahmed
idk, you added that in the first script
but removed it in the second
which resulted in two returns things in the second case x)
oh well first script had a switch
ah k
but there are still 2 returns x)
Works great!!!!
well yeah
Cool @odd jay
Thanks a lot guys!
@turbid tide i have never wrote a papi script but i made a depending plugins on papi I don't even know what is diffrence
Lol
well in script you can't do everything you can do in a plugin
it doesn't allow you to change things
just to check things and return something based on what you just checked
Just placeholders?
you can check anything. you can use server and player methods
as well
just can't change or affect anything ingame
also you can save stuff using data
ugh not rly
So a plugin is better
🙂
Hello, can someone help me create a placeholder with javascript, pls?
In case someone wonders, I've made a correction on the previous javascript where you helped me.
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;
}
returnEmpty();```
I edited the line 6, added so that placeholder2 should be empty, because when you temporary grant the permission access.spawn, then the `var placeholder` would also return "Yes", but now it will also require to have the permission on "Yes" but with no expiry time to set in "&aIt is permanent" :))
that does what exactly?
Are you asking to me? xD
O
no I'm not
HiddenInNight asked for a javascript placeholder
but didn't give any other information
Bliitz, sorry if I bother, now It would last something to change the time format of %luckperms_expiry_time_access.spawn%. Could it be possible on the same javascript?
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;
}
returnEmpty();```
So a parse example of the time format on `%luckperms_expiry_time_access.spawn% ` is "10d 18h 10m 29s" (days hours minutes seconds). Is it possible to change that format to "&f10&7Days &f18&7Hours &f10Minutes &f29&7Seconds"?
Are you up to help me with this one pls? :((
This one might be tough :(( tho if you aren't able right now is all ok
but here is an advice
use .split to split the string in a list. split them on spaces
then use .replace to replace d to days etc.
well I saw the example of tomi and it helped me to create my placeholder. 😆
then return it using array[0] + array[1]+ etc.
Denada :v
oh ok HiN
Thanks blitz! I will take those advices in mind
Tomi maybe a bit later if I finish my stuff
Sure, I will come back if I can't with it 😄 good luck with that blitz
ty ty
ok @odd jay I kind of finished my thing. Figured it out xD. Took me 30 minutes but got there in the end
Really? lmao xD
Yeah, when placeholder2 isn't on "", then it is because the player has temporary the permission "access.spawn" and the countdown is running
k think I got it. time to put it in practice
I can help you too, if you share the changes :D, thanks in advance sir
nah no worries doesn't look so hard to do
well I'm probably not doing it in the easiest and best way but still
cool! can't wait to see it working xD already happy
ok I think I thought of a even better way
better:D!
"&f10&7Days &f18&7Hours &f10Minutes &f29&7Seconds"``` this is for me to see
ugh for minutes do I do &7 as welol ?
well*
Yup, remember that if the player for example has the permission for only 7 hours, and 29 seconds, it would be "&f7&7Hours &f29&7Seconds"
yeah I know
yup, same with minutes
well the problem will be
when you have 1 hour
1 day
it will say 1 hours
...
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";
var changed= placeholder2.replace("d", "&7Days&f").replace("h", "&7Hours&f").replace("m", "&7Minutes&f").replace("s", "&7Seconds")
}
returnEmpty();```
didn't test it
but you can test it for me
also add ;
at the end
I keep forgetting them
Yeah, not a big deal with that, but isn't there a way to check if the number next to (for example) Days it is 1, and if it is "1Days" then it will turn "1Day"?
well I could go for the other way
using split
it will be a lot longer
and a lot messier
if you want
O let me see the first try, I want to see it, looks good
and a lot messier
Nvm, I wouldn't touch that javascript anymore because that is the only thing I need for it and then it would be definetely finished
just lmk if this one works
Sure, gonna test it and update in a sec
Hmm
the "its permanent" thing works great, "You don't have" thing also works great, but when I turn the temporary permission, the placeholder returns empty
Below var changed and all the values right? following the spaces
Yup, script error
:(( shoot, really?
maybe I could use lastIndexOf if that one works to check
Seems like a good idea to use that one
well, actually idk
lastIndexOf would check for the last letter of the value?
no
it will check where a substring appears last in a string
ok try this
var placeholder2 = "10 d 10 h 10 m 10s";
var placeholder = "%luckperms_check_permission_access.spawn%";
function returnEmpty()
{
if (placeholder == "Yes" && placeholder2 == "")
return "&aIt is permanent";
if (placeholder2 == "")
return "&cYou don't have";
var changed= placeholder2.split(" ");
if(changed[1].lastIndexOf("d") != -1){
return changed[0].replace("d", "&7Days&f ") + changed[1].replace("h", "&7Hours&f ") + changed[2].replace("m", "&7Minutes&f ") + changed[3].replace("s", "&7Seconds")
}
return changed;
}
returnEmpty();```
but only try it with a permission
that goes for days
sure
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";
var changed= placeholder2.replace("s", "&7Seconds").replace("m", "&7Minutes&f").replace("h", "&7Hours&f").replace("d", "&7Days&f");
return changed;
}
returnEmpty();``` this is my last try. I have to go take a shower
you don't have to change anything to this one
Works for everything! except seconds, the number is shown but the "&7Seconds" nope
ugh
last one ```
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";
var changed= placeholder2.replace("s", "&7Seconds");
placeholder2 = changed.replace("m", "&7Minutes&f");
changed = placeholder2.replace("h", "&7Hours&f");
placeholder2 = changed.replace("d", "&7Days&f");
return placeholder2;
}
returnEmpty();```
dk why it wouldn't show seconds
really? why?
oh nvm
just the spaces
or are those alright ?
oh they are
because they are already there
welp nice it works
It is ok without spaces, do you want a screenshot?
nah
I'm listening xD
I tried with a 4 hours and 30 seconds one, it turned "&f4&7Hours &f30&7SeconDays&fs
right
that makes sense
welp I'm going to take a shower now
and I'll take a look a bit later
XD
Np! Thanks anyways!!
It is still appreciated, you already helped a lot
If I get to make something successfull on it I will share it and probably ask for add it on Community Javascripts
I mean its probably possiblle in some easy way that I can't think of
wait just got an idea
xD
I hate it when I get ideas
Cool! 🍮
lmao
var placeholder2 = "%luckperms_expiry_time_access.spawn%";
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("s", "&7Minutes&f");
if(placeholder2.includes(h))
changed= placeholder2.replace("s", "&7Hours&f");
if(placeholder2.includes(d))
changed= placeholder2.replace("s", "&7Days&f");
return changed;
}
returnEmpty();``` @odd jay
try this one
sURE!
let's see if actually includes
works
because I was just told never tested it myself
xD
the plugin returns a timer
because they look like variables
for a permission
i don't think you get it
and he wants it to be Days Hours Minutes Seconds

var placeholder2 = "%luckperms_expiry_time_access.spawn%";
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("s", "&7Minutes&f");
if(placeholder2.includes("h"))
changed= placeholder2.replace("s", "&7Hours&f");
if(placeholder2.includes("d"))
changed= placeholder2.replace("s", "&7Days&f");
return changed;
}
returnEmpty();```
here
xD
cj first I checked in .replace and saw them in "" so I was confused why you're correcting me xD
ok dude
xD
what
var placeholder2 = "%luckperms_expiry_time_access.spawn%";
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();```
here xD
if(placeholder2.includes("s"))
do if statements work that way in javascript? @turbid tide ||without brackets||
tomi how would that cause an issue
look
("s")
(placeholder2.includes("s"))
OH
at the start
cj didn't start this myself xD
He is right
So what could be the script error?
what's the error in console
O
Tomi?
letme check 1 sec
UHj It lags my pc to like 3 fps
what does
the error on console is spamming
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.
?paste
Suresure, I always use hastebin xD
meh
My host doesn't support .log and I have to download it (it is 168MB), but I think I see the cause of it, on the console
yup, placeholder2.includes on line 1 is not a function
sorry for not using hastebin, I could barely take a screenshot to it
Spigot

Spigot 1.8.8
change to paper
Why paper? I currently have like 75 plugins, will Paper be compatible with all of em?
well currently I don't think this js will work on 1.8.8 spigot
not sure about paper, blitzz might know more
Hmm why would it be that blitz?
throw it on a test server and see
Yes, I will just put Luckperms and Papi on it, I will use Paper 1.8
Last version of both
Finished
so I tested it on an empty server using Paper 1.8.8, I only pasted Luckperms and Papi (last version of both), still got the same error message, but hopefully it didn't spam, and I could make a hastebin, this is the message error https://hastebin.com/bofalahoga.cs
i do not know
So I guess another way that doesn't have ".includes" must be taken :(, I think it won't be possible, any idea Blitz?
can we go back to splitting?
Sure we can
or just edit the lp expansion
the lp expansion? are you meaning the time format? lp is using TimeUtils of Papi, I already even tried suggesting to lucko to add a way to change the time format directly but he told me that xD, the only way would be to change each expiry on javascripts
if you decompile and edit it you can do whatever you want
with TimeUtils on papi?
what is timeutils
what it uses Papi to make countdowns I guess, LuckPerms use it for the expiry/temporary permissions
i don't understand lp code
🤷♂️
it's all tied in
the javascript would work if the engine wasn't fucked
or whatever is going on
because i'm pretty sure if you tried it on latest, it'd work fine
Spigot 1.16?
K! I will test it on 1.15.2
is 1.16 officially out now?
Yup
I will update in 3 minutes
I'm still opening my minecraft on 1.15.2 xD, tho the server is ready
Still the same error, it is spamming since I'm on Spigot now
apparently on Paper, console error messages won't spam, thats a big pro lol
with the same cause
still using server.pro, should I try on a localhost?
yes
Ok, but I will first try on spigot 1.8.8
(because I already have a premade one)
or should I go for 1.15.2?
just go for whatever
I got a question why does %statistic_mine_block% does
x = number of blocks mined
Mined block +1 = x + 2
? (sorry for this example)