#How to make a multi Purpose menu
1 messages · Page 1 of 1 (latest)
Whenever they want to delete a specified home, save the home name in a meta string and then get the value of it in the confirmation menu and make it execute /delhome %player_name%:%deluxemenus_meta_homeToDelete_STRING%
How do i do that?
When the user clicks the delete home item, add to the click_commands
[meta] set homeToDelete STRING <homeName>
and open the delete confirmation menu. From there, when the user clicks on the green wool, the console executes delhome %player_name%:%deluxemenus_meta_homeToDelete_STRING%
So the delhome will be a console command. What is the homeToDelete?
home name?
that's the meta key which has the value of the home name which the player wants to delete
and <homeName> is the home name in the click commands before setting the home
lemme try
Can i do it for 1 items with multiple slots and use meta to make it work like it works in the menu?
Or do i need to do each item?
You have to do it for each item, with the meta value corresponding to the home name
ok 😄
Could you tell me a way to Make the beds turn? Like a permission or a string for if a player has home, the others become red and the player needs permissions
I tried to recreate the exact same menu you try to but I couldn't get it working correctly because if you delete a home, all the other homes shift -1
uhh
But here are some placeholders that could help:
%essentials_home_<number>%
%essentials_home_<number>_<w|x|y|z>%
%essentials_homes_set%
%essentials_homes_max%
oh yes
like i will be naming the homes. But if a players deletes a home, i want it to show create home again
I get that, if you have 2 homes and parse %essentials_home_1% you get the name of the first home you set. If you now delete the first home and parse %essentials_home_1% again, you're going to get the name of the second home
They're either using some custom plugin or just have thought it through, honestly no idea
My idea is, if you dont have a home. I will set a string equal view requirement which willshow us silver if we can make more homes
For that you can use the < requirement, input would be %essentials_homes_set%, output would be %essentials_homes_max%
it's light_gray_bed. And also, the type would be <, not string equals
ok
why is the menu not loading
do you have the essentials expansion?
nope
wait no yes
i do
the menu is not opening
input should be %essentials_homes_set%
Ok found the error
missed '' for the < logo
sign
I'd like it if you stuck around to see the progress
Sure, keep me updated!
What is the placeholder for home name?
first one
I put name there?
I want a placeholder for home name
yeah try it, it shows the home name. If you first set home A and then B, putting 1 into the placeholder would return A, and 2 would return B
but deleting would reset the names
And it’d be empty if there’s no home
yep thats the issue
could i use minimum_requirements
Try it idk
DUDE
I used this and the delhome command stopped woring altogether
So when the home is set, it doesnt show in the menu
but when i change something
it does
.
Idk why but my minimum requirements is not working
show config
yes
this
if any of those values contain home1
it should stop at that
home1
if any one of these return home1
the item should be shown
ok, try remove stop_at_success
you can use meta, it from deluxemenus and can use as memory
so
how can i make it so that the menu remembers if a person has set home on a specific item
?
click_commands:
- '[meta] set home1 STRING yes' #(0)
#- '[meta] set home1 STRING or whatever you want' #(1)
view_requirement:
requirements:
'use placeholder':
type: string equals
input: '%deluxemenus_meta_home1_STRING%'
output: 'yes'
'use deluxemenus config':
type: has meta
key: 'home1'
meta_type: STRING
value: yes
# %deluxemenus_meta_<meta name>_<type>_<default>%
#
# <meta name> is the name of meta, i set above 'home1'
#
# <type> is data type in program language
# + STRING to store some text, (0) will return 'yes'
# (1) will return 'or whatever you want'
# + INTEGER to store a number: 0, 1, 123, 5435
# + DOUBLE to store a number with decimal: 0.0, 1.56, 2.123123
# + BOOLEAN to store 'true' or 'false' value
#
# <default> will return it if nothing got memory
#
# example: %deluxemenus_meta_this-is-a-test_INTEGER_100%
# 1. return with nothing inside: 100
# 2. return with a value inside:
# + [meta] set this-is-a-test INTEGER 2000 -> return 2000
# + [meta] add this-is-a-test INTEGER 1 -> return 2001
# + [meta] subtract this-is-a-test INTEGER 2 -> return 1999
# + [meta] remove this-is-a-test INTEGER a -> return 100 (default)
# + [meta] set this-is-a-test INTEGER null -> same with remove, but meta still get store a blank
# same <meta name> cant get store at two or more diffefent <type>
# %deluxemenus_meta_home1_STRING% %deluxemenus_meta_home1_INTEGER%, if you call two of these, you get some error