#HELP ABOUT DELUXEMENUS ( HARD SOLVE )
1 messages · Page 1 of 1 (latest)
That is the only way to do it.
Metadata is not that hard if you think about it.
You store data for a player. The data is stored as key-value pairs. You use the key to look for the data.
In your case you would need at least 2 things to store: material and price.
When the market menu is opened, you clear the metadata (using open_commands).
When an item is clicked, you set the metadata and open the confirmation menu
That should be it
I just crated that just look at it:
`menu_title: '&8Satın Alma Onayı'
open_actions:
- '[sound] BLOCK_NOTE_BLOCK_PLING 1 1.5'
size: 27
items:
'red-glass':
material: RED_STAINED_GLASS_PANE
display_name: '&cİptal Et'
lore:
- '&7Satın alma işlemini iptal et.'
slot: 11
actions:
- '[close]'
- '[sound] BLOCK_NOTE_BLOCK_BASS 1 0.8'
'green-glass':
material: LIME_STAINED_GLASS_PANE
display_name: '&aOnayla'
lore:
- '&7Eşyayı satın al ve envanterine ekle.'
- '&eFiyat: &6%confirm_price% TL'
slot: 15
actions:
- '[check_vault_balance] %confirm_price% sufficient:true fail_action:[message] &cParan yeterli değil! fail_action:[sound] BLOCK_ANVIL_LAND 1 0.5 fail_action:[close]'
- '[vault_take] %confirm_price%'
- '[give_item] %confirm_item_material% 1 name:%confirm_item_name% lore:%confirm_item_lore%' # Eşya verme kısmında hala yer tutucuları kullanıyoruz.
- '[close]'
- '[sound] ENTITY_PLAYER_LEVELUP 1 1'
- '[message] &a&lBaşarılı! &7%confirm_item_name% satın alındı.'
'confirm-item-display': # HATA VEREN KISIM BU!
material: 1 # --> BURAYA DİREKT SAYISAL ID YAZIYORUZ! (1 = STONE)
display_name: '&fOnaylanacak Eşya'
lore:
- '&7Lütfen satın alımı onaylayın.'
slot: 13
actions:
- '[sound] BLOCK_NOTE_BLOCK_HAT 1 1'
'filler-item':
material: GRAY_STAINED_GLASS_PANE
display_name: ' '
lore: []
slots: [0,1,2,3,4,5,6,7,8,9,10,12,14,16,17,18,19,20,21,22,23,24,25,26]
actions:
- '[sound] BLOCK_GLASS_BREAK 1 0.5'`
then I generally getting that
that's because 1 is not a valid material?
like just gimme example please I want to do that
like gimme number or smth example
minecraft:stone
(#0001/0)
like that?
Hi
And what is [check_vault_balance}? I never heard/see that on documentation :o