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

Return true/false

Discussion in 'Requests' started by LordArrow9, Jan 21, 2021.

  1. LordArrow9

    LordArrow9 Creeper

    Messages:
    2
    GitHub:
    LordArrow9
    Hey i searched on much websites but i don't find what return false and return true does and what the difference is.
     
    Primus likes this.
  2. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    Primus and mmm545 like this.
  3. mmm545

    mmm545 Baby Zombie

    Messages:
    152
    GitHub:
    mmm545
    also i would assume you are talking about onCommand, returning false sends the player the usage message
     
    HimbeersaftLP and Primus like this.
  4. LordArrow9

    LordArrow9 Creeper

    Messages:
    2
    GitHub:
    LordArrow9
    And what return true; does?
     
    Primus likes this.
  5. mmm545

    mmm545 Baby Zombie

    Messages:
    152
    GitHub:
    mmm545
    doesn't send anything (means the command ran successfully)
     
    HimbeersaftLP and Primus like this.
  6. OguzhanUmutlu

    OguzhanUmutlu Witch

    Messages:
    63
    GitHub:
    OguzhanUmutlu
    false says pocketmine this command shouldn't run
    true says command successfully used
     
  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.