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

Using commnad

Discussion in 'Development' started by Harviy11, Dec 3, 2016.

  1. Harviy11

    Harviy11 Baby Zombie

    Messages:
    100
    Hello, I have registred commands in my plugin and when i use /command it send me message what i want, but it send usage: /command.
    How to remove it?
     
  2. Harviy11

    Harviy11 Baby Zombie

    Messages:
    100
    Problem solved, sorry for unnecessary post
     
  3. Rateek

    Rateek Silverfish

    Messages:
    15
    GitHub:
    RATEEK
    In your plugin.yml is what?
     
  4. Harviy11

    Harviy11 Baby Zombie

    Messages:
    100
    command:
    usage: /command
    description: hat
     
  5. Rateek

    Rateek Silverfish

    Messages:
    15
    GitHub:
    RATEEK
    commands:
    command:
    description: "Command"
     
  6. Harviy11

    Harviy11 Baby Zombie

    Messages:
    100
    do not fix problem
     
  7. Rateek

    Rateek Silverfish

    Messages:
    15
    GitHub:
    RATEEK
    Done Main.php please
     
  8. Awzaw

    Awzaw Zombie Pigman Poggit Admin

    Messages:
    726
    GitHub:
    awzaw
    Solved or not?! It's better if you put the full code on github and provide a link, but try adding return true; at the end of your function.
     
    applqpak likes this.
  9. Rateek

    Rateek Silverfish

    Messages:
    15
    GitHub:
    RATEEK
    Yes I did not see thin! Resolved?
     
  10. Harviy11

    Harviy11 Baby Zombie

    Messages:
    100
    Ok, Solved
     
  11. Awzaw

    Awzaw Zombie Pigman Poggit Admin

    Messages:
    726
    GitHub:
    awzaw
    You are supposed to say how you solved it, so that others can benefit too...
     
    Last edited: Dec 3, 2016
    applqpak likes this.
  12. Harviy11

    Harviy11 Baby Zombie

    Messages:
    100
    add to end of command
    PHP:
    $event->setCancelled();
    if you have this problem.
     
  13. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Wait are you handling a command or an event? You didn't provide enough context...
     
    applqpak likes this.
  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.