#Need help for View_Requirement

1 messages · Page 1 of 1 (latest)

solid heron
#

I want to prevent a person from reopening that menu unless they have already ranked. I thought about adding a viewing reqirement and allowing item change upon obtaining the permission, but I couldn't manage it. Can you help me with this?

items:
  'kömür':
    material: 'basehead-eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYTY3YjQ3ZmJkMzdjNmQ5ZDhkMjJkOTczZTcyOTBlODA4NTJlOTI2NmEwNzZmYjdhYjIxNWFmZTkxYjgxZWQ2YyJ9fX0='
    slot: 10
    priority: 1
    hide_attributes: true
    display_name: '&3⇨&8Kömür'
    lore:
      - '&7◇ &fİki Sethome Hakkı'
      - ''
      - '&7◇ &f/pv 2 Hakkı'
      - ''
      - '&9Gereksinimler:'
      - '&7◇ &f500 Ada Seviyesi'
      - '&7◇ &f5000 Para'
    click_commands:
    - '[console] dm open rkömür_menu %player_name%'
    - '[sound] ENTITY_EXPERIENCE_ORB_PICKUP'
    - '[close]'
    click_requirement:
      requirements:
        adalevel:
          type: '>='
          input: '%superior_island_level_int%'
          output: 500
        para:
          type: has money
          amount: 5000
        Permission1:
          type: has permission
          permission: 'default'  
      deny_commands:
      - '[message] &cKömür rütbesine ulaşmak için 500 ada seviyesi ve 5000 para gerekiyor.'
      - '[sound] BLOCK_ANVIL_LAND'
      - '[close]'
    

  'kömürulaşıldı':
    material: 'basehead-eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYTY3YjQ3ZmJkMzdjNmQ5ZDhkMjJkOTczZTcyOTBlODA4NTJlOTI2NmEwNzZmYjdhYjIxNWFmZTkxYjgxZWQ2YyJ9fX0='
    slot: 10
    priority: 2
    update: true
    hide_attributes: true
    display_name: '&3⇨&8Kömür'
    view_requirement: 'BukkitPlayer.hasPermission("gizle.kömür")'
    lore:
      - '&a Bu rütbeye ulaştın!'
    click_commands:
    - '[message] &5Rütbe &7» &cHali hazır da bu rütbedesin!'
    - '[sound] ENTITY_EXPERIENCE_ORB_PICKUP'
    - '[close]'```
#

What I put in shows only the one with the lowest priority, it does not change.

teal sonnet
#
'not buy':
  priority: 2
  material: stone
  slot: 10
  click_commands:
    - '[givepermission] test.perm'
    - '[refresh]'
'bought':
  priority: 1
  material: sand
  slot: 10
  view_requirement:
    requirements:
      'has perm':
        type: has permission
        permission: 'test.perm'
solid heron
teal sonnet
solid heron
teal sonnet
solid heron
#

its finally done