• Trong thời gian này, bạn không thể tạo bài mới, đăng comment, hay tạo tài nguyên mới để diễn đàn dọn dẹp nội dung.
    Diễn đàn sẽ sớm mở trở lại, chi tiết hãy theo dõi tại Discord
Alastor070802

Hỏi đáp Requirements của DeluxeMenus không hoạt động

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'
 
Nội dung tương tự Xem nhiều nhất Xem thêm

Thống kê nội dung

Tạo
Alastor070802,
Trả lời
0
Lượt xem
191
Quay lại
Trên cùng