saxonov80
Пользователь
- Сообщения
- 68
- Решения
- 8
- Плагин
- DeluxMenus
- Ядро сервера
- Purpur
- Версия сервера
- 1.21
Хочу создать магазин книг зачарований. Нужно чтобы можно было как купить книгу, так и продать. Нужен пример с кодом. Заранее благодарю.
YAML:
'1':
material: book
enchantments:
- 'DURABILITY;5'
slot: 1
amount: 1
display_name: '&bEnchanted book'
lore:
- ''
- '&aleft click buy &eх1 - &610$'
- '&cright click sell &eх1 - &60.1$'
- ''
- '&2Your balance: &e%vault_eco_balance_fixed%$'
left_click_requirement:
requirements:
balance:
type: has money
amount: 10
deny_commands:
- '[sound] BLOCK_NOTE_BLOCK_IRON_XYLOPHONE'
- '[message]'
- '[message]&6&l(&e$&6&l) &cYou do not have enough funds to purchase this item!'
- '[message]'
right_click_requirement:
requirements:
item_check:
type: has item
material: book
enchantments:
- 'DURABILITY;5'
amount: 1
deny_commands:
- '[sound] BLOCK_NOTE_BLOCK_IRON_XYLOPHONE'
- '[message]'
- '[message]&6&l(&e!&6&l) &cYou do not have enough items to sell this item!'
- '[message]'
left_click_commands:
- '[takemoney] 10'
- '[refresh]'
- '[message]'
- '[message]&6&l(&e$&6&l) &2Thank you for your purchase, your current balance is: &e%vault_eco_balance_fixed%$'
- '[message]'
- '[console] cmi give %player_name% enchanted_book e unbreaking:5 1 -s'
right_click_commands:
- '[givemoney] 0.1'
- '[refresh]'
- '[message]'
- '[message]&6&l(&e$&6&l) &2Thank you for selling this product. Your current balance: &e%vault_eco_balance_fixed%$'
- '[message]'
- '[console] clear %player_name% enchanted_book e unbreaking:5 1 -s'