how to i add permissions?

Discussion in 'Plugin Development' started by dark2222, Apr 2, 2012.

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

    dark2222

    what up guys i have a problem i warn't to add permissions to my command but every time i do this

    Code:
    public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args){
        Player player = (Player) sender;
        if(cmd.getName().equalsIgnoreCase("helpbot"));
        if(player.hasPermission("helpbot.helpbot"));
        player.sendMessage(ChatColor.GOLD + "/hbegin" + "/hicon" + "/hlong" + "/hlwc");
       
    [U]else[/U] player.sendMessage(ChatColor.RED + "you dont have permissions do that command!");
    and it say else is wrong i have tried
    {else}
    }else
    }else{
    {else
    {}else
    but all is wrong
     
  2. Offline

    CorrieKay

    ...add brackets to your if statements. It will help clear the issue up.
     
  3. Offline

    surtic

  4. Offline

    dark2222

    call down i begin with this for ca 7 days ago
    and i now that with if true do some and if it false do some else
     
Thread Status:
Not open for further replies.

Share This Page