Simple problem, help needed

Discussion in 'Plugin Development' started by Andrewsnowfalls, Jul 19, 2012.

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

    Andrewsnowfalls

    Ive recently re-started my plugin development hobby. I decided to get a little refreshed with some methods and simple code.
    I wrote some code but it seems everytime I put it into a my own local server the plugin shows up (when i do /pl) but the command just doesnt seem to want to show up)

    Main class code
    Code:
    package com.Andrew;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.plugin.java.JavaPlugin;
    public class UltDestruction extends JavaPlugin{
     public void onEnable(){
      
     }
     public void onDisable(){
      
     }
     public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
         if(cmd.getName().equalsIgnoreCase("ignite")){
             Player s = (Player)sender;
             Player target = s.getServer().getPlayer(args[0]); 
             target.setFireTicks(10000);
             return true;
         }
         return false;
     }
    }
    Yml file:

    Code:
    name: UltDestruction
     
    main: com.Andrew.UltDestruction
     
    version: 0.0.1
     
    commands:
     
    basic:
     
    description: This is a demo command.
     
    usage: /<command> [player]
     
    permission: UltDestruction.ignite
     
    permission-message: You don't have <permission>
     
    
     
  2. Offline

    Benni1000

    If you register the command "basic" you can't use the command "ignite".
    You have to register ignite in the plugin.yml
     
  3. Offline

    kamikazi3728

    in plugin.yml change "basic" to "ignite"
     
  4. Offline

    Andrewsnowfalls

    I changed it yet it still gives me the unknown command error

    [Edit] nevermind, it seems the plugin.yml was in a bad format. Thanks anyway <3
     
Thread Status:
Not open for further replies.

Share This Page