Return ?

Discussion in 'Plugin Development' started by JOPHESTUS, Aug 31, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    JOPHESTUS

    Heyloew gaize,

    What does return true; and return false; do? What is the difference? Are they necessary?

    That is all,
    JOPH
     
  2. Offline

    Cirno

    For commands, they end the command most of the time.

    For functions, they return a boolean so you can use it to compare, like
    Cirno.isCirno() != false
    it would return true since I am Cirno, unless...
     
    Courier likes this.
  3. Offline

    JOPHESTUS

    Which one do I use to end a command?
     
  4. Offline

    Courier

    Return true if you handled the message; return false if you did not. If you return false, bukkit will send the "usage" to the sender.
     
Thread Status:
Not open for further replies.

Share This Page