Effects help

Discussion in 'Plugin Development' started by mrbill513, Oct 25, 2012.

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

    mrbill513

    What i am trying to do is when the player does a command it does a effect this is the code i have so far

    Code:
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
            if(cmd.getName().equalsIgnoreCase("smoke")){
                Player p = (Player) sender;
                sender.sendMessage(ChatColor.GREEN + "SMOKE!");
                World w = p.getWorld();
                w.playEffect(p.getLocation(), Effect.SMOKE, null);
            }
    return false;
    When i do the command in game i get "A internal error error has occurred"
    Also i am really new to making plugins.
     
  2. Offline

    cman1885

    Why'd you put null on the last parameter? Just put 1.
    EDIT: And return true.
     
  3. Offline

    kennylax12

    The last paramater is for the direction of the smoke. Also I'm not sure if what exactly you are trying to do, but when you type the command /smoke it will not follow the player's direction.
     
  4. Offline

    wowlover6877

    mrbill513
    Can you show us the error? Also, do you have a plugin.yml?
     
  5. Offline

    cman1885

    Actually I'm 99% sure it's intensity and it does nothing, unless I have that mistaken with the playSound that was added then removed.
     
  6. Offline

    exload

    For smoke it is direction.

    Also, I was logged into my old account. kennylax12 = exload
     
Thread Status:
Not open for further replies.

Share This Page