1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Plugin command not showing in command list

Discussion in 'Development' started by Robertcc19, Dec 30, 2016.

  1. Robertcc19

    Robertcc19 Silverfish

    Messages:
    18
    I have been scouring source code and the api docs but I am having an issue, even though I register the command in the plugin.yml it does not show up in the help section and is not recognized.

    PHP:
    nameSpawnAnimals
    main
    robertcc19\spawnanimals\AnimalSpawn
    version
    1.0.0
    api
    3.0.0-ALPHA1
    commands
    :
    vc:
    description"This command will spawn animals all over the world"
    usage"/vc"
    What am I missing?
     
  2. GamakCZ

    GamakCZ Zombie Pigman

    Messages:
    598
    GitHub:
    GamakCZ
    1) You have to do a gap
    2) You do not have to use '' ... "

    PHP:
    nameSpawnAnimals
    main
    robertcc19\spawnanimals\AnimalSpawn
    version
    1.0.0
    api
    3.0.0-ALPHA1
    commands
    :
        
    vc:
           
    descriptionThis command will spawn animals all over the world
           usage
    : /vc
     
    Robertcc19 and Primus like this.
  3. GamakCZ

    GamakCZ Zombie Pigman

    Messages:
    598
    GitHub:
    GamakCZ
    No need to, if I'm commands used only description
     
  4. Robertcc19

    Robertcc19 Silverfish

    Messages:
    18
    GamakCZ had the right answer, I did not realize that I did not have the indents.
     
  5. GamakCZ

    GamakCZ Zombie Pigman

    Messages:
    598
    GitHub:
    GamakCZ
    When using the default you must also use permissions.

    PHP:
    ...
    commands:
        
    vk:
            
    description:  random description
            usage
    : /vk
            permission
    vk.cmd

    permissions
    :
        
    vk.cmd:
            
    descriptionperms for /vk command
            
    default: true

    :D
     
  6. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    incorrect!
    you CAN use it without permission BUT that means everyone can run it
     
  7. GamakCZ

    GamakCZ Zombie Pigman

    Messages:
    598
    GitHub:
    GamakCZ
    Ok sorry... I using permission :)
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.