#Issue Registering Commands

1 messages · Page 1 of 1 (latest)

amber swan
#

I have a menu that I am trying to register the open command.
When I add the line register_command: true to the menus .yml file typing the open command in games gives me a "Unknown or incomplete command" error like you would get if you typed in a command that doesn't exist

#

Server Version: Paper 1.19.3
Plugin Version: 1.13.6

patent berry
#

can u send the first lines of your menu?

#

that r the commands and the register command

amber swan
#

sure

#

1 sec

#
open_command:
  - pcmds
register_command: true
size: 27
update_interval: 1```
patent berry
#

backspace twice before the - pcmds

#

and restart your server so it ll get register

amber swan
#

👍 k ill give that a try

patent berry
#

lmk if its fixed

amber swan
#

this is correct?

open_command:
- pcmds
register_command: true
size: 27
update_interval: 1```
patent berry
#

yup

#

it should work now

#

but as an unregister command

#

( i think )

amber swan
#

testing it now

patent berry
#

awesome

amber swan
#

nice no error but my menu doesnt open now...

patent berry
#

after the restart?

amber swan
#

correct, and no errors in console about syntax

#

i have the permission deluxemenus.open
do i need more?

patent berry
#

no u dont rly need a permission if u r op

#

is the command registered?

amber swan
#

im not opped, testing as player rank

#

yeah the command is registered now 😄 ty

patent berry
#

oh

#

do u have any open requirement in your menu?

amber swan
#

yes i have a has permission type and checked that the player does have the specified permission

#

is this correct?

  requirements:
    permission:
      type: has permission
      permission: example.permission```
patent berry
#

do u have the example.permission yourself?

amber swan
#

i do

patent berry
#

can u remove the open requirement and try it without it?

#

do u use luckperms?

amber swan
#

i do use luckperms and i added the permission directly to my user and it worked so it must be a permissions issue

patent berry
#

probably

#

does it work without the open requirement?

#

u dont rly need an open requirement if your menu is public

#

and not smth for vips

amber swan
#

i have different menus per rank and lower ranks shouldnt be able to see higher ranks menus

#

it does work without the open requirement btw

#

if i were to use "deluxemenus.menu.pcmds" as the permission would that mess up anything?

patent berry
#

nah u can set any permission u like

#
open_requirement:
  requirements:
    has_permission:
      type: 'has permission'
      permission: 'test.menu'
      deny_commands:
      - '[message] &7[&c&l!&7] &7Oops Access denied!'
#

copy past this

#

and do your changes

#

i tested it and it works fine for me

amber swan
#

i think i just had an issue with inheritances. i changed my rank to the exact rank for the menu and it worked 😄

#

ty

patent berry
#

oh lol

#

np :d

amber swan
#

feel free to close this ticket. Thanks again

patent berry
#

u can close the post yourself

amber swan
#

oh? how?

#

nvm i see it

patent berry
#

right click on the post