Solved Command is unknown

Discussion in 'Plugin Development' started by warg, May 12, 2013.

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

    warg

    Code:
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
            if(cmd.getName().equalsIgnoreCase("whatever")){
                Player target = sender.getServer().getPlayer(args[0]);
                target.setHealth(20);
                return true;
            }
            return false;
        }
    Why is my command /whatever unknown to the server? The plugin is loading and activated by Bukkit.
     
  2. Offline

    chasechocolate

    Did you register it in your plugin.yml?
     
  3. Offline

    warg

    That was what I forgot after playing around and solving my other problems. Thanks!
     
Thread Status:
Not open for further replies.

Share This Page