#DeluxeMenus Minimum Requirements

1 messages · Page 1 of 1 (latest)

grizzled dragon
#

I'm using minimum_requirements for my Kit GUI. If a user has a permission node for a higher rank, it should display a different item, but is displaying the Villain-Locked item. Part of my config below. Can anyone spot an issue?

  Villain-Higher_Rank:
    material: paper
    nbt_int: CustomModelData:10140
    priority: 3
    view_requirement:
      minimum_requirements: 1
      requirements:
        HasCrook:
          type: has permission
          permission: essentials.kits.Crook
        HasWanted:
          type: has permission
          permission: essentials.kits.Wanted
    slot: 11
    display_name: "&5&lVillain Kit"
    lore:
    - "&7You cannot access this kit"
    - "&7as you have a higher rank."
    hide_attributes: true
    hide_enchantments: true
    hide_effects: true
    hide_unbreakable: true
######################################################################################################
  Villain-Locked:
    material: paper
    nbt_int: CustomModelData:10140
    priority: 4
    slot: 14
    display_name: "&5&lVillain Kit"
    lore:
    - "&7Unlock this kit by purchasing"
    - "&7a rank from the &e/store&7."
    hide_attributes: true
    hide_enchantments: true
    hide_effects: true
    hide_unbreakable: true```

https://gyazo.com/3d9d8bbb591f8c219f8a125d1eca4642.png
mental goblet
#

I think you have to add optional: true to both hasCrook and HasWanted requirements

grizzled dragon
#
  Burglar-Higher_Rank:
    material: paper
    nbt_int: CustomModelData:10140
    priority: 3
    view_requirement:
      minimum_requirements: 1
      requirements:
        HasWanted:
          optional: true
          type: has permission
          permission: essentials.kits.Wanted
        HasCrook:
          optional: true
          type: has permission
          permission: essentials.kits.Crook
        HasVillain:
          optional: true
          type: has permission
          permission: essentials.kits.Villain
    slot: 11
    display_name: "&3&lBurglar Kit"
    lore:
    - "&7You cannot access this kit"
    - "&7as you have a higher rank."
    hide_attributes: true
    hide_enchantments: true
    hide_effects: true
    hide_unbreakable: true
######################################################################################################
  Burglar-Locked:
    material: paper
    nbt_int: CustomModelData:10140
    priority: 4
    slot: 13
    display_name: "&3&lBurglar Kit"
    lore:
    - "&7Unlock this kit by purchasing"
    - "&7a rank from the &e/store&7."
    hide_attributes: true
    hide_enchantments: true
    hide_effects: true
    hide_unbreakable: true```
Still displays the "Locked" item
#

Do I need stop_at_success? That's not essential right?

mental goblet
#

not sure, try it

granite hare
# grizzled dragon Do I need `stop_at_success`? That's not essential right?

stop at success is not necessary but here's how it works:

let's say you have 3 requirements, 2 optional and 1 not and you set the minimum requirements option to 1. If you have stop_at_success set to true and 1 of the optional requirements is met and the others are not, it will act like all requirements are met but also if the non optional requirement is met, it will act like all requirements are met.

grizzled dragon
#

Yeah, so my config still displays the Locked item though. Got any ideas where the logic is? I'm going to try invert the check.

granite hare
grizzled dragon
#

I do?

granite hare
#

oh. I am blind as fuck

#

ok. so then. first thing I Can think about is that you don't actualy meet any of the view requirements

grizzled dragon
#

Yeah I do meet one of them