#click_requirement doesnt work

1 messages · Page 1 of 1 (latest)

mossy oak
#

Hello, me click requirement doesn't work for some reason -_-

      requirements:
        balance_check:
          type: javascript
          expression: '%playerpoints_points% >= 250'
          success_commands:
          - '[console] points take %player_name% 250'
          - '[console] lp user %player_name% parent set vip'
          - '[sound] ENTITY_PLAYER_LEVELUP'
          - '[close]'
          deny_commands:
          - '[sound] BLOCK_NOTE_BLOCK_IRON_XYLOPHONE'
          - '[close]'```
#

--FIXED--

pulsar kestrel
mossy oak
#

i will fix it

pulsar kestrel
#
  selflock:
    material: basehead-eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjZmODRiZjlhZTJjYTYzMDdlY2Y3MWI4ODYyNjllMmZiYzJhZTZkYzEzNzAxNjhmOWYwZWYyYmQ0OTY0Y2VkMCJ9fX0=
    slot: 50
    priority: 0
    update: true
    item_flags: [HIDE_ATTRIBUTES]
    display_name: ' '
    lore:
      - ' &#FF0000Л&#F70000и&#F00000ч&#E80000н&#E10000ы&#D90000й &#CA0000т&#C30000и&#BB0000т&#B40000у&#AC0000л'
      - ''
      - ' &7| &fСтатус: &#f52249Заблокирован'
      - ''
      - ' &7| &fМожно купить на сайте:   '
      - ' &7| &eMy website  '
      - ''
    click_commands:
      - '[sound] entity_evoker_hurt'
      - '[message] &f'
      - '[message] &f &7• &#AD5BFFСайт проекта: &f&nMy website'
      - '[message] &f'
      - '[close]'
      
  self_4yro4ka_unlock:
    material: basehead-eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODllNDMzMzg0YWVmOTdkMTUzNzBiYWQ0NDI2YThmYTEzNDNkNWNkMzMwMDY3ZWFmZGYyOTg4MWJhMjYwMjhmMyJ9fX0=
    slot: 50
    priority: 5
    update: true
    item_flags: [HIDE_ATTRIBUTES]
    display_name: ' '
    lore:
      - ' &fТитул &8| &#FF8A8A&lᴅ&#FF8791&lᴇ&#FF8499&lᴠ &#FF7FA8&lᴛ&#FF7CAF&lᴇ&#FF79B7&lᴀ&#FF76BE&lᴍ'
      - ''
      - ' &7| &fСтатус: &#4eff65Разблокирован'
      - ' &7| &fБудет выглядеть так:'
      - ' &7• %luckperms_prefix%%player_name% &#FF8A8A&lᴅ&#FF8791&lᴇ&#FF8499&lᴠ &#FF7FA8&lᴛ&#FF7CAF&lᴇ&#FF79B7&lᴀ&#FF76BE&lᴍ'
      - ''
      - ' &7| &#4eff65Нажмите, &fчтобы &#4eff65установить &fтитул.  '
      - ''
    click_commands:
      - '[console] lp user %player_name% meta setsuffix " &#FF8A8A&lᴅ&#FF8791&lᴇ&#FF8499&lᴠ &#FF7FA8&lᴛ&#FF7CAF&lᴇ&#FF79B7&lᴀ&#FF76BE&lᴍ"'
      - '[sound] BLOCK_NOTE_BLOCK_IRON_XYLOPHONE'
    view_requirement:
      requirements:
        player_name:
          type: string equals
          input: "%player_is_op%"
          output: "yes"
inner elm
pulsar kestrel
#

Ok I'll try this...

pulsar kestrel
pulsar kestrel
#
  selflock:
    material: basehead-eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjZmODRiZjlhZTJjYTYzMDdlY2Y3MWI4ODYyNjllMmZiYzJhZTZkYzEzNzAxNjhmOWYwZWYyYmQ0OTY0Y2VkMCJ9fX0=
    slot: 50
    priority: 0
    update: true
    item_flags: [HIDE_ATTRIBUTES]
    display_name: ' '
    lore:
      - ' &#FF0000Л&#F70000и&#F00000ч&#E80000н&#E10000ы&#D90000й &#CA0000т&#C30000и&#BB0000т&#B40000у&#AC0000л'
      - ''
      - ' &7| &fСтатус: &#f52249Заблокирован'
      - ''
      - ' &7| &fМожно купить на сайте:   '
      - ' &7| &eMy website  '
      - ''
    click_commands:
      - '[sound] entity_evoker_hurt'
      - '[message] &f'
      - '[message] &f &7• &#AD5BFFСайт проекта: &f&nMy website'
      - '[message] &f'
      - '[close]'
      
  self_4yro4ka_unlock:
    material: basehead-eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODllNDMzMzg0YWVmOTdkMTUzNzBiYWQ0NDI2YThmYTEzNDNkNWNkMzMwMDY3ZWFmZGYyOTg4MWJhMjYwMjhmMyJ9fX0=
    slot: 50
    priority: 5
    update: true
    item_flags: [HIDE_ATTRIBUTES]
    display_name: ' '
    lore:
      - ' &fТитул &8| &#FF8A8A&lᴅ&#FF8791&lᴇ&#FF8499&lᴠ &#FF7FA8&lᴛ&#FF7CAF&lᴇ&#FF79B7&lᴀ&#FF76BE&lᴍ'
      - ''
      - ' &7| &fСтатус: &#4eff65Разблокирован'
      - ' &7| &fБудет выглядеть так:'
      - ' &7• %luckperms_prefix%%player_name% &#FF8A8A&lᴅ&#FF8791&lᴇ&#FF8499&lᴠ &#FF7FA8&lᴛ&#FF7CAF&lᴇ&#FF79B7&lᴀ&#FF76BE&lᴍ'
      - ''
      - ' &7| &#4eff65Нажмите, &fчтобы &#4eff65установить &fтитул.  '
      - ''
    click_commands:
      - '[console] lp user %player_name% meta setsuffix " &#FF8A8A&lᴅ&#FF8791&lᴇ&#FF8499&lᴠ &#FF7FA8&lᴛ&#FF7CAF&lᴇ&#FF79B7&lᴀ&#FF76BE&lᴍ"'
      - '[sound] BLOCK_NOTE_BLOCK_IRON_XYLOPHONE'
    view_requirement:
      requirements:
        player_name:
          type: string equals
          input: "%player_name%"
          output: "4yro4ka"
#

this

mossy oak
#

ok

#

give me a minute

pulsar kestrel
#

okey

mossy oak
#

so what exactly doesn't work?

#

does it like not show up the item?

#

or does the click commands not working?

pulsar kestrel
#

self_4yro4ka_unlock

#

that

mossy oak
#

Have you tried swapping priorities?

#

so self_4yro4ka_unlock would be priority 1 and selflock would be priority 2

mossy oak
pulsar kestrel
#

It works once I mean

inner elm
#

Just threw this into a random menu of mine to test it out for you. I swapped your priorities and it seems to be working fine for me. This is what I see de-opped https://frigs.me/qXvQz1.png

#

my owner prefix is obviously different to what you have but thats just my custom resourcepack doing that

#
  selflock:
    material: basehead-eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjZmODRiZjlhZTJjYTYzMDdlY2Y3MWI4ODYyNjllMmZiYzJhZTZkYzEzNzAxNjhmOWYwZWYyYmQ0OTY0Y2VkMCJ9fX0=
    slot: 22
    priority: 5
    update: true
    item_flags: [HIDE_ATTRIBUTES]
    display_name: ' '
    lore:
      - ' &#FF0000Л&#F70000и&#F00000ч&#E80000н&#E10000ы&#D90000й &#CA0000т&#C30000и&#BB0000т&#B40000у&#AC0000л'
      - ''
      - ' &7| &fСтатус: &#f52249Заблокирован'
      - ''
      - ' &7| &fМожно купить на сайте:   '
      - ' &7| &eMy website  '
      - ''
    click_commands:
      - '[sound] entity_evoker_hurt'
      - '[message] &f'
      - '[message] &f &7• &#AD5BFFСайт проекта: &f&nMy website'
      - '[message] &f'
      - '[close]'
      
  self_4yro4ka_unlock:
    material: basehead-eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODllNDMzMzg0YWVmOTdkMTUzNzBiYWQ0NDI2YThmYTEzNDNkNWNkMzMwMDY3ZWFmZGYyOTg4MWJhMjYwMjhmMyJ9fX0=
    slot: 22
    priority: 0
    update: true
    item_flags: [HIDE_ATTRIBUTES]
    display_name: ' '
    lore:
      - ' &fТитул &8| &#FF8A8A&lᴅ&#FF8791&lᴇ&#FF8499&lᴠ &#FF7FA8&lᴛ&#FF7CAF&lᴇ&#FF79B7&lᴀ&#FF76BE&lᴍ'
      - ''
      - ' &7| &fСтатус: &#4eff65Разблокирован'
      - ' &7| &fБудет выглядеть так:'
      - ' &7• %luckperms_prefix%%player_name% &#FF8A8A&lᴅ&#FF8791&lᴇ&#FF8499&lᴠ &#FF7FA8&lᴛ&#FF7CAF&lᴇ&#FF79B7&lᴀ&#FF76BE&lᴍ'
      - ''
      - ' &7| &#4eff65Нажмите, &fчтобы &#4eff65установить &fтитул.  '
      - ''
    click_commands:
      - '[console] lp user %player_name% meta setsuffix " &#FF8A8A&lᴅ&#FF8791&lᴇ&#FF8499&lᴠ &#FF7FA8&lᴛ&#FF7CAF&lᴇ&#FF79B7&lᴀ&#FF76BE&lᴍ"'
      - '[sound] BLOCK_NOTE_BLOCK_IRON_XYLOPHONE'
    view_requirement:
      requirements:
        player_name:
          type: string equals
          input: "%player_is_op%"
          output: "yes"
#

Config with the changed priorities

#

oops wrong person

pulsar kestrel
#

I see that, but you needed to reload plugin twice for example, because after that it stops work. Also in input I would like to use %player_name% (plugin behaves differently with that, idk why). So tysm for helping, I think I need to try to fix it after plugin update

inner elm
#

like /dm reload breaks it?

pulsar kestrel
#

Yea

#

And server restarting

inner elm
#

Interesting i am not experiencing that 😳

#

Just reloaded twice.. Cant restart on the one im on since its a prod server but

#

What would you want the %player_name% to output? Your username?

#

I unfortunately cant really understand what the menu is for, all I can read is the Dev Team suffix getting applied. If this is for a team of people to use, you'll likely want a different placeholder than %player_name% to avoid having to create multiple view requirements for each team members username

#
    view_requirement:
      requirements:
        on_dev_team:
          type: string equals
          input: "%player_has_permission_has.devteam%"
          output: "yes"

Instead, I would just give has.devteam (or whatever permission you want) to the dev rank, that way anyone who has that role or inherits from it, gets to use that button

#

You will have to negate this permission from default users by doing
/lp group default permission set has.devteam false

pulsar kestrel
#

This nenu is considered to allow people make their custom suffixes (I make them in menu).

#

And this type of requirement I chose to simplify granting people their suffixes

#

Dev team is an example

inner elm
pulsar kestrel
#

ok, tysm <3

inner elm
#

np!! if you have any more troubles with it throw it in here and i can try to troubleshoot some more