Solved Return true or false in onCommand method?

Discussion in 'Plugin Development' started by MattexFilms, Aug 26, 2013.

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

    MattexFilms

    What is the difference between returning true and false in the onCommand method?
     
  2. Offline

    Skyost

    This is a good plugin.yml :
    Code:
    name: Ghost Player
    main: com.skyost.gp.GhostPlayerPlugin
    description: Be ghooooooooost !
    version: 1.2
    author: Skyost
    website: http://dev.bukkit.org/bukkit-mods/ghost-player/
    commands:
    ghostview:
      aliases: gv
      description: Look at the block in front of you like a ghost.
      usage: Simply type /ghostview or /gv to look at the block in front of you like a ghost.
      permission: ghostplayer.player.ghostview
    ghost:
      aliases: g
      description: Turns you into a ghost and allow you to see ghosts.
      usage: Simply type /ghost or /g to turn you into ghost !
      permission: ghostplayer.player.beghost
    silentghost:
      aliases: sg
      description: The same than /ghost but doesn't tell "You are a ghost now !".
      usage: Simply type /silentghost or /sg to turn you into ghost !
      permission: ghostplayer.player.beghost
    human:
      aliases: h
      description: Turns you into a human and disallow you to see ghosts.
      usage: Simply type /human or /h to turn you into human !
      permission: ghostplayer.player.behuman
    silenthuman:
      aliases: sh
      description: The same than /human but doesn't tell "You are an human now !".
      usage: Simply type /silenthuman or /sh to turn you into human !
      permission: ghostplayer.player.behuman
    removeghost:
      aliases: rg
      description: Remove <player> from the ghosts.
      usage: Simply type /removeghost <player> or /rg <player> to remove <player> from the ghosts !
      permission: ghostplayer.admin.removeghost
    clearsghosts:
      aliases: cg
      description:  Clears all ghosts. May need a small reload/restart before taking any effect !
      usage: Simply type /clearsghosts or /cg to clears all ghosts !
    humanworld:
      aliases: hw
      description:  Add a world to the list of the worlds where the plugin is disabled.
      usage: Simply type /humanworld <world> or /hw <world> to add a world where the plugin is disabled !
      permission: ghostplayer.admin.sethumanworld
    ghostworld:
      aliases: gw
      description:  Remove a world from the list of the worlds where the plugin is disabled.
      usage: Simply type /ghostworld <world> or /gw <world> to remove a world from the list where the plugin is disabled !
      permission: ghostplayer.admin.setghostworld
    ghosthunter:
      aliases: gh
      description:  Turns you into a ghost hunter, not an human but not a ghost !
      usage: Simply type /ghosthunter or /gh to turns you into a ghost hunter !
      permission: ghostplayer.player.beghosthunter
    silentghosthunter:
      aliases: sgh
      description:  Turns you into a ghost hunter, not an human but not a ghost and doesn't tell "You are a ghost hunter now !".
      usage: Simply type /silentghosthunter or /sgh to turns you into a ghost hunter !
      permission: ghostplayer.player.beghosthunter
    removeghosthunter:
      aliases: rgh
      description:  Remove <player> from the ghosts hunters.
      usage: Simply type /removeghosthunter <player> or /rgh <player> to to remove <player> from the ghosts hunters !
      permission: ghostplayer.player.beghosthunter
    permissions:
    ghostplayer.player.*:
      description: Give access to every players commands.
      children:
      ghostplayer.player.ghostview: true
      ghostplayer.player.beghost: true
      ghostplayer.player.behuman: true
      ghostplayer.player.beghosthunter: true
    ghostplayer.admin.*:
      description: Give access to every administrators commands.
      children:
      ghostplayer.admin.removeghost: true
      ghostplayer.admin.removeghosthunter: true
      ghostplayer.admin.clearsghosts: true
      ghostplayer.admin.sethumanworld: true
      ghostplayer.admin.setghostworld: true
    ghostplayer.*:
      description: Give access to every Ghost Player commands.
      children:
      ghostplayer.player.ghostview: true
      ghostplayer.player.beghost: true
      ghostplayer.player.behuman: true
      ghostplayer.player.beghosthunter: true
      ghostplayer.admin.removeghost: true
      ghostplayer.admin.removeghosthunter: true
      ghostplayer.admin.clearsghosts: true
      ghostplayer.admin.sethumanworld: true
      ghostplayer.admin.setghostworld: true
    ghostplayer.player.ghostview:
      default: true
      description: Allow you to view a block like a ghost !
    ghostplayer.player.beghost:
      default: true
      description: Allow you to be a ghost !
    ghostplayer.player.behuman:
      default: true
      description: Allow you to be an human !
    ghostplayer.player.beghosthunter:
      default: true
      description: Allow you to be a ghost hunter !
    ghostplayer.admin.removeghost:
      default: op
      description: Allow you to remove a player from the ghosts !
    ghostplayer.admin.removeghosthunter:
      default: op
      description: Allow you to remove a player from the ghosts hunters !
    ghostplayer.admin.clearsghosts:
      default: op
      description: Allow you to clears all ghosts !
    ghostplayer.admin.sethumanworld:
      default: op
      description: Allow you to add a world to the list where the plugin is disabled !
    ghostplayer.admin.setghostworld:
      default: op
      description: Allow you to remove a world from the list of the worlds where the plugin is disabled !
    
    If the command return false, a message with the 'Usage' will be sent to the player.
     
  3. Offline

    MattexFilms

    Ahh okay, thanks.
     
Thread Status:
Not open for further replies.

Share This Page