#DeluxeMenus GUI doesn’t open when slot has only locked/buy states

1 messages · Page 1 of 1 (latest)

wraith mulch
#

Hi, I’m having an issue with DeluxeMenus when using multiple items in the same slot with different states (locked / buy / owned).
The problem is that the menu does not open at all unless I’m OP or I already have the final permission (owned state).
If the player has no permission, not enough points, and not enough money, the menu fails to open completely
If I give myself OP or the permission, the menu opens correctly and shows the owned item
https://paste.helpch.at/witafifaya.lua

tawdry shell
#

Add priority to items occupying the same slot: https://wiki.helpch.at/helpchat-plugins/deluxemenus/options-and-configurations/item#priority

  "vacallo1_locked":
        material: HORSE_SPAWN_EGG
        slot: 10
        priority: 0
        display_name: "&cVacallo &7(Livello 1)"
        lore:
          - "&7Non possiedi questo cavallo."
          - ""
          - "&8Requisiti:"
          - "&7• &f50 Punti"
          - "&7• &f100$"
        view_requirement:
          requirements:
            not_owned:
              type: "!has permission"
              permission: "vacallo.horse.level1"
              
  "vacallo1_buy":
        material: HORSE_SPAWN_EGG
        slot: 10
        priority: 1
        display_name: "&eVacallo &7(Livello 1)"
        lore:
          - "&aDisponibile per l'acquisto!"
          - ""
          - "&7Prezzo: &e100$"
          - "&7Punti richiesti: &e50"
          - ""
          - "&a▶ Clicca per acquistare"
        view_requirement:
          requirements:
            points_ok:
              type: comparator
              comparator: ">="
              input: "%playerpoints_points%"
              output: "50"
            has_money:
              type: has money
              amount: 100
        left_click_commands:
          - "[console] lp user %player% permission set vacallo.horse.level1 true"
          - "[console] eco take %player% 100"
          - "[message] &aHai acquistato Vacallo Livello 1!"
          - "[refresh]"
          
  "vacallo1_owned":
        material: HORSE_SPAWN_EGG
        slot: 10
        priority: 2
        display_name: "&aVacallo &7(Livello 1)"
        lore:
          - "&aCavallo acquistato!"
          - ""
          - "&7▶ Clicca per evocarlo"
        view_requirement:
          requirements:
            has_perm:
              type: "has permission"
              permission: "vacallo.horse.level1"
        left_click_commands:
          - "[player] 540f383__00917"
wraith mulch
# tawdry shell Add `priority` to items occupying the same slot: https://wiki.helpch.at/helpchat...

Hi, thank you for the help so far, I really appreciate it 🙏
I’m still having an issue with my DeluxeMenus GUI and I wanted to explain it better.
At the moment:
If I am not OP, I only see the “not purchased / locked” state
even if I have the correct points and money, the item never changes to the buy state.
If I am OP (so I have all permissions), I expected to see directly the owned state
(because it has higher priority and only checks for the permission),
but instead I see the buy state.
Because of this, I’m not sure if my view_requirement for the buy item is correct.
What I want to achieve is:
If the player does NOT have the permission
but HAS enough PlayerPoints and money,
then the player should see the buy state.
If the player HAS the permission,
then only the owned state should be visible.
If the player does not meet the requirements,
they should only see the locked state.
So my question is:
Is my view_requirement for the buy item set up correctly, or am I missing an extra condition?