• Chào bạn, hãy đăng ký hoặc đăng nhập để tham gia cùng bọn mình và sử dụng được đầy đủ chức năng của diễn đàn :).
Alastor070802

Hỏi về server Requirements của DeluxeMenus không hoạt động

Alastor070802

THÀNH VIÊN
Tham gia
19/01/2026
Bài viết
2
Tôi mới tập thành code DeluxeMenus, và muốn làm 1 cái shop có chức năng bán và mua. plugins tôi dùng là coinsengine, placeholderapi.
khi tôi prase /papi prase <tên_người_chơi> %coinsengine_balance_raw_shard% thì vẫn thấy số tiền hiện lên, nên không biết lỗi ở chỗ nào. Mong mọi người giúp đỡ, cảm ơn
Mã:
open_command: shop
size: 9
menu_title: '&aSMP Shop'

items:

  stone:
    material: STONE
    slot: 0
    display_name: '&fStone'
    lore:
      - '&aMua: &e5 coins'
      - '&cBán: &e2 coins'
      - '&7Trái chuột: Mua 1'
      - '&7Phải chuột: Bán 1'

    click_requirement:
      left:
        requirements:
          money:
            type: placeholder
            placeholder: "%coinsengine_balance_raw_shard%"
            comparison: '>='
            value: 5
            deny_commands:
              - '[message] &cBạn không đủ tiền!'
      right:
        requirements:
          has_stone:
            type: placeholder
            placeholder: '%checkitem_amount:STONE%'
            comparison: '>='
            value: 1
            deny_commands:
              - '[message] &cBạn không có Stone để bán!'

    left_click_commands:
      - '[console] shard remove %player_name% 5'
      - '[console] give %player_name% minecraft:stone 1'
      - '[message] &aBạn đã mua 1 Stone'

    right_click_commands:
      - '[console] clear %player_name% minecraft:stone 1'
      - '[console] shard give %player_name% 2'
      - '[message] &aBạn đã bán 1 Stone'


  iron:
    material: IRON_INGOT
    slot: 1
    display_name: '&fIron Ingot'
    lore:
      - '&aMua: &e20 coins'
      - '&cBán: &e10 coins'
      - '&7Trái chuột: Mua 1'
      - '&7Phải chuột: Bán 1'

    click_requirement:
      left:
        requirements:
          money:
            type: placeholder
            placeholder: '%coinsengine_balance_raw_shard%'
            comparison: '>='
            value: 20
            deny_commands:
              - '[message] &cBạn không đủ tiền!'
      right:
        requirements:
          has_iron:
            type: placeholder
            placeholder: '%checkitem_amount:IRON_INGOT%'
            comparison: '>='
            value: 1
            deny_commands:
              - '[message] &cBạn không có Iron để bán!'

    left_click_commands:
      - '[console] shard remove %player_name% 20'
      - '[console] give %player_name% minecraft:iron_ingot 1'
      - '[message] &aBạn đã mua 1 Iron Ingot'

    right_click_commands:
      - '[console] clear %player_name% minecraft:iron_ingot 1'
      - '[console] shard give %player_name% 10'
      - '[message] &aBạn đã bán 1 Iron Ingot'
 
Similar content Most view Xem thêm
Back
Top Bottom