zMenu icon indicating copy to clipboard operation
zMenu copied to clipboard

[Suggestion] Add requirements for PlayerDatas

Open NoltoxGit opened this issue 1 year ago • 3 comments

Hello, Would it be possible to add a requirement with the player datas system ?

      requirements:
        - type: data
          key: "KEY"
          value: "VALUE"

And for the invert:

      requirements:
        - type: !data
          key: "KEY"
          value: "VALUE"

NoltoxGit avatar Apr 19 '24 09:04 NoltoxGit

you can pretty much already do this with the placeholders for playerdata.


       - type: placeholder                                                                          
          placeholder: "%zmenu_player_value_lockout%name%%"
          value: "false"
          action: CONTAINS_STRING      

RustyDagger avatar Apr 19 '24 13:04 RustyDagger

you can pretty much already do this with the placeholders for playerdata.


       - type: placeholder                                                                          
          placeholder: "%zmenu_player_value_lockout%name%%"
          value: "false"
          action: CONTAINS_STRING      

Yes, I know it's possible like that, but I was looking for a way to avoid the cachePlaceholderAPI in some cases to do faster actions.

NoltoxGit avatar Apr 19 '24 20:04 NoltoxGit

you can pretty much already do this with the placeholders for playerdata.


       - type: placeholder                                                                          
          placeholder: "%zmenu_player_value_lockout%name%%"
          value: "false"
          action: CONTAINS_STRING      

Yes, I know it's possible like that, but I was looking for a way to avoid the cachePlaceholderAPI in some cases to do faster actions.

ah fair enough, from my experiance playing with it this playerdata lookup via placeholders was already way more reliable and faster than say checking a permission node ( that needs a menu refresh currently )

RustyDagger avatar Apr 20 '24 06:04 RustyDagger