#Permissions for open-command

1 messages · Page 1 of 1 (latest)

mild laurel
#

Is there a way I can make it so that a specific permission is required to use the open-command of the menu.
I know about open-requirement, but that makes it so that the menu can not be opened even by the console for a specific player.

pseudo dust
#

you can make an optional open_requirement with success_commands

#
open_requirement:
  requirements:
    permission:
      type: has permission
      permission: my.permission
      success_commands:
        - "[message] You have the permission!"
mild laurel
#

but then, if I do not have the my.permission permisson, the menu will not open for me even if the console tries to open it using the /dm open <menu> <player> command

pseudo dust
#
open_requirement:
  requirements:
    permission:
      type: has permission
      permission: my.permission
      optional: true 
      success_commands:
        - "[message] You have the permission!"
#

forgot to add the optional: true line, my bad

mild laurel
#

what does the optional do?

pseudo dust
#

exactly what it says

#

makes the requirement optional

mild laurel
#

the requirement is optional?

#

so that would mean

#

wait

#

i'll just test it

mild laurel
#

@pseudo dust , it does not help.
if optional: true is added, i can use the open_command without the permission

pseudo dust
#

that's why I told you to use the success_commands and not the open_commands

#

oh

#

oooooh

#

I understand the issue

#

I thought you didn't want to run the open_commands

mild laurel
#

not open_commands

pseudo dust
#

yeah I don't think there's a way to do what you want with only DeluxeMenus

#

you could just remove the open_command, and use another plugin to add a command that runs /dm open