#deluxemenus upgrade menu

1 messages · Page 1 of 1 (latest)

red needle
#

Hello, I need help creating a menu in DeluxeMenus.

I want to create a simple menu for my survival economy server where players can purchase a /back upgrade for 2500 in-game currency.

After purchasing, the player should automatically receive the permission cmi.command.back (I use LuckPerms).

The menu should either close after purchase and, when reopened, show a barrier item in place of the upgrade, indicating that it has already been bought.

If the player doesn’t own the upgrade yet, they should see an ender pearl item with the description and price.

Ideally, the menu updates automatically depending on whether the player owns the upgrade, showing the correct item (buy / already purchased).

I have tried different configurations using view_requirement on permissions and placeholders, but after purchase, the item doesn’t update correctly.

I’m using:

DeluxeMenus (latest version)

CMI (for /back and economy)

LuckPerms (for permission management)

Vault + EssentialsX

Could you please help me with a sample config that works properly?

Thanks a lot!

red needle
#
menu_title: '&8&lUpgrades'
size: 27
open_command:
  - upgrades

items:
  back_upgrade_unlocked:
    material: BARRIER
    slot: 13
    display_name: '&cAlready Purchased'
    lore:
      - '&7You already own this upgrade.'
    view_requirement: has_bought_back

  back_upgrade:
    material: ENDER_PEARL
    slot: 13
    display_name: '&aUnlock &e/back'
    lore:
      - '&7Gain the ability to use &e/back &7after death.'
      - ''
      - '&6Price: &c2500$'
      - '&8Click to purchase.'
    left_click_commands:
      - '[require] money >= 2500'
      - '[console] eco take %player_name% 2500'
      - '[console] lp user %player_name% permission set cmi.command.back true'
      - '[console] dm setmeta %player_name% bought_back true'
      - '[message] &aYou have unlocked &e/back&a!'
      - '[close]'
    view_requirement: not_bought_back

requirements:
  has_bought_back:
    type: string_equals
    meta: bought_back
    input: 'true'

  not_bought_back:
    type: string_equals
    meta: bought_back
    input: 'true'
    negate: true