#Make `slot` and `data` options for menu able to parse placeholders

1 messages · Page 1 of 1 (latest)

whole tide
#

This will help us make dynamic menus without utilizing dynamic stuff too much,
probably material too should be able to do this, this will make DM so powerful

frail prism
#

material can do this, so can data

#

slot however, I would also love to see one day but 🤷‍♂️

#
material: placeholder-%player_item_in_hand%
data: placeholder-%player_item_in_hand_data%
whole tide
whole tide
#

then it ignores it

#

however it doesn't work anyways

whole tide
#

should i wait here for additional answers from devs or should i ask on DM's github?

frail prism
#

it will most likely be added one day

#

but probably not high on the priority list

#

seems planned

whole tide
#

as you said

whole tide
#

but it doesn't work

frail prism
#

that screenshot does me no good

#

lol

#

?paste

runic meadowBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

whole tide
whole tide
whole tide
dense tide
whole tide
#

thanks for feedback

whole tide
#

i also tried

data: "placeholder-%server_online%"
#

with quotes

dense tide
whole tide
#

paper 1.12.2

dense tide
#

And what number the placeholder return?

whole tide
#

3

#

(light blue)

#

sorry i can't send images directly

runic meadowBOT
whole tide
#

it's always white no matter what placeholder outputs (whichever number 0-53)
i tested using custom placeholders (rocketplaceholders and also mycommand playerdata placeholders)

dense tide
#

didn't see all the info

whole tide
#

no problem

dense tide
#

let me check something and I'll be back

whole tide
#

i just lost url so i came back to it

#

no problem no hurry

#

i will be afk for 5-10 mins

#

or less

dense tide
#

you can basically add ranges

frail prism
#

@whole tide any error in console when trying this or nah

dense tide
#

hmm. looked at the code and it seems alright. do answer cj's question tho as if there's something wrong with the data, there should be a warning showing.

#

Otherwise, if it does not show a warning, you can try the 1.13.7 builds

runic meadowBOT
whole tide
whole tide
#
[17:54:39] [Server thread/INFO]: [DeluxeMenus] Loading DeluxeMenus v1.13.7-DEV-152
[17:54:39] [Server thread/INFO]: [DeluxeMenus] NMS hook has been setup successfully!
[17:54:45] [Server thread/INFO]: [DeluxeMenus] Enabling DeluxeMenus v1.13.7-DEV-152
[17:54:45] [Server thread/INFO]: [DeluxeMenus] Successfully hooked into PlaceholderAPI!
[17:54:45] [Server thread/INFO]: [DeluxeMenus] 8 GUI menus loaded!
[17:54:45] [Server thread/INFO]: [DeluxeMenus] Successfully hooked into Vault!
#

i restarted server to use 1.13.7 dev

whole tide
#

so basically this is my logs after i've tried to open that menu and checked the GUI itself - still white glass panes
also i checked if the config is for some/any reason reverted or this item is somehow not saved correctly or whatever... it's the same so

items:
  'filler-black_panels':
    material: STAINED_GLASS_PANE
    data: placeholder-%server_online%
    slots:
    - 0
    - 1
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
    - 9
    - 17
    - 18
    - 26
    - 27
    - 35
    - 36
    - 44
    - 45
    - 46
    - 47
    - 48
    - 49
    - 50
    - 51
    - 52
    - 53
    display_name: '&r'
#

ok yes i will use X-X from now on thanks blitz (for slots)

#

so, in short: latest dev build acts the same for this

#

is there even a code that makes placeholder-%placeholder% available? for data

whole tide
#

if there is not, probably someone planend to add it so someone added it to wiki

frail prism
#

wiki is always last step

whole tide
#

weird

#

well

#

i will going to try 1.16.5 paper

frail prism
#

what is %server_online% returning atm?

whole tide
#

waut

frail prism
#

/papi parse me %server_online%

whole tide
#

i did it on console

#

doesn't matter right?

dense tide
#

yeah. shouldn't

whole tide
whole tide
#

i will try 1.16.5 paper

frail prism
#

?materials

runic meadowBOT
frail prism
#

well at that point you don't use data I believe

#

ya, all materials have names like LIME_STAINED_GLASS_PANE

#

last thing I can think of is just send your entire menu

#

?paste

runic meadowBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

frail prism
#

make sure nothing is weirdly funky or something idk

whole tide
#

ok

#

1.16.5 don't have data stuff?

#

because there is BLACK_STAINED_GLASS_PANE

dense tide
#

@frail prism any chance you can get a test server on and test this stuff? I can't today

dense tide
whole tide
#

ok then

#

ah

#

ok should i try with stone?

#

or there is GRANITE

#

existing in 1.16

#

like material name

frail prism
#

no more data stuff in 1.16.5 at all I don't think

whole tide
#

yeah

frail prism
#

not for separate items at least

whole tide
#

😩

dense tide
#

yeah. in 1.13+ data works just for damageable items

#

like pickaxe and stuff

#

and it just show how much damage they've taken

frail prism
#

does your item displayname show correctly as blank?

frail prism
#

can you send me your menu

#

?paste

runic meadowBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

whole tide
#

i'm going to test exact same thing on paper 1.12.2 now

#

should the diamond sword have durability bar because data is whatever the %server_online% is and is not 0?

whole tide
#

ok idk if this is considered as a bug

~~ ~~
paper 1.12.2 / DM-1.13.7-DEV-152

(GUI) INGAME: https://prnt.sc/oDdq08ELOmDW
(GUI) CONFIG: https://paste.helpch.at/ijovelohak.yaml
%player_item_in_hand% OUTPUT: https://prnt.sc/_6KSXcs_e7S6

No console logs

~~ ~~

  • First time both material (using placeholder as value) and data (also using placeholder as value) work CORRECTLY:

paper 1.16.5 / DM-1.13.7-DEV-152

(GUI) INGAME: https://prnt.sc/OgYEbuEk7qbm
(GUI) CONFIG: https://paste.helpch.at/axufegokad.yaml
~~ ~~

dense tide
whole tide
#

even though 1.12.2 is suffering more, there is also a bug in 1.16 (probably 1.13+?) versions that if you use regular material name + data via placeholder-%placeholder% it will abort that data option at all (that's what i conclude when i consider everythign i tested)

dense tide
#

That's just happens when you create a nether star with data I believe

#

try removing data: from the one with the nether star

whole tide
#

omg

#

you're right

whole tide
#

but for 1.12

#

yeah iwill do that right now and both mat and data will work

#

lol yes you're right xd

whole tide
whole tide
#

i am confusion

#

ok no jokes now

whole tide
#

so placeholder-%placeholder% in data ONLY works if there is also the same thing (placeholder-%placeholder%) for material

#

yeah

#

which is

#

not so cool

#

but still usable

frail prism
#

i see why

#

@dense tide it's just brackets

whole tide
#

{

#

ok so can we make a deal now

#

i catched a bug!
can you now PLEASE add support for placeholder-%placeholder% for slot option for item

#

😭

#

lol jk

#

but it is so simple to add it right?

#

just add whatever papi code like it is for data to slot?

#

i mean i would probably know how to do it whne source code goes public BUT i will not be able to revert code to 1.12 supported lol

#

that's why i ask but doesn't matter no problem

#

xd

frail prism
#

Ok so blitz I don't want to commit and mess up any formatting changes

#

but i can make a build for you

#

should fix

whole tide
#

ah

#

i mean i understand it's not easy

#

because slot is probably only accepting integers and material and data whole bunch of stuff too - different

#

ok nvm

frail prism
#

tbh I'd rather have a {slot} placeholder that I can use in the item information

frail prism
#

so I can fill slots 0-53 with 1 item, but use something like {slot} in the lore (inside placeholders that deal with the data most likely)

whole tide
#

oh

#

at first

frail prism
#

good for pagination

#

ok so i made the build finally but like last time, I forget where it goes

whole tide
#

few years ago i wanted to make kitpvp server but i don't like having 1000 plugins
so i always use some classic plugins (that are NOT skript) like DeluxeMenus for menus and MyCommand for probably anything else
So i wanted to make personal kit menu where each user will see their own kits, but how do i sort them?
So that's why i wanted to use slot: %placeholder%

dense tide
whole tide
#

i regret not asking for this long ago

frail prism
#

just gotta shift a bracket

dense tide
#

can you send dirrect link?

#

I did look at the code and somehow missed it

frail prism
#

i did too

#

not obvious because it's just indentation mostly

frail prism
#

but no bracket after the else between that line

dense tide
frail prism
#

ALL of this is the else

dense tide
#

Can't see it.

frail prism
#

Sir, I'm sorry to tell you this

#

but you're blind

dense tide
#

haha

whole tide
#

itemStack = new ItemStack(material, amt);

#

this?

frail prism
#

blitz

#

where do builds get made

dense tide
#

build/libs/

#

in the main directory

frail prism
#

I knew it was libs

#

i went to the wrong libs

whole tide
#

hey hey, you can just send me source code and i can compile it myself 🤭 🫰

#

jk

#

i will test rn

#

why is that 1.13.5 and latest is 1.13.6 and dev is 1.13.7

#

ok should i test it?

frail prism
#

yes

dense tide
frail prism
#

tf

whole tide
#

ok now i'm worried

dense tide
# frail prism tf

Probably just need to pull? Also make sure you're on the main branch

whole tide
#

ok sorry

#

i used some stupid item and opened menu

#

and send error logs

whole tide
frail prism
#

idk what is up sorry I can't build it

whole tide
#

oh ok

#

no worries

#

one side question (it is related to the title of this post in some way)
when DM becomes open source, will we be able to browse all other previous commits?

frail prism
#

Blitz I don't have the actual solution, it's around some water bottle stuff that I'm not understanding

whole tide
#

xd

dense tide
#

I can take a look either this night or tomorrow maybe

frail prism
#

Okay, I think I have a fix but my build isn't working due to some stuff not downloading idrk

whole tide
#

i mean, you know what... i understand that we can't really have animated menus because refreshing of each icon will pull a lot of cpu usage or whatever you answered last time i asked "will we ever get Dynamic/Animated Menus like per item" and i fully agree with that, no need for that, but at least this - making placeholder-%placeholder% usage possible for slot item option

#

using some custom placeholders where you can make player's personal custom placeholders (just like vanilla statistics, but custom), this thing (placeholders in slot) will literally open up SO much horizonts for customizing and making GUI menus "dynamic"

#

like, extremely useful

#

just let me know what amount of donation (in $) you want

#

i am hardcore DM user, i won't change no matter what

#

that's why i want to see that, i bet people will use it widely, nobody even thought of using this (not significant amount of people i mean)

#

@dense tide sorry i won't ask again after this, but i hope to potentially see it at least in 1.13.9, not after 1.14...

#

it can't be possible it'll take so much time, i just few time used papi in my own plugins like used it as hook and i remember it was not that hard to make it work, no chance it would take more than even hour, not even that?

#

not saying anything bad or whatever, i just really want to see that

dense tide
#

It will require me to change quite a bit of how the entire menu works.

#

That's why I Said it won't happen until after 1.14.0. Because that's when we'll clean the plugin up

whole tide
#

ah, ok, sorry sorry

#

now i understand

#

ok should i post this feature request or whatever (placeholders in slot and slots) on github or?

#

like where do you track stuff

#

to not forgot about this

dense tide
#

we already have an issue open for it

#

It's just not been possible without a bunch of changes. Changes that would require heavy testing

#

testing that takes time. time that I don't really have

whole tide
#

Sadly for me is opposite

#

i have a lot of time but no near your knowledge (java coding)

whole tide
#

anyways i will wait for new update for data to be fixed when placeholder-%placeholder% is used,
thanks

dense tide
#

I found out what cj was talking about and am hoping this fixes it

whole tide
#

for some reason

#

i will test right now

dense tide
#

alright. let me know how it goes

whole tide
#

works

#

ok in general, i used custom placeholder

#

not the server online one

#

same thing

#

= works

#

first menu is selection menu where i pick what punishment i want to give to a player, after i pick one depending on which one i picked, glass panes of next menu will be colored accordingly

#

!

#

very nice

#

this is last goodbye to slots feature request, may we see you after DM 1.14.0 release! 🫡

whole tide
whole tide