Command does nothing

Discussion in 'Plugin Development' started by beatON, Feb 6, 2014.

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

    beatON

    So, i want to start creating plugins and was watching some youtube videos, reading about it.

    I tried making a test plugin and writing a test command, but it doesn't work for some reason. (Nothing happens when i enter it). Using 1.7.2 beta build craftbukkit and bukkit.

    Source : http://pastebin.com/m5XawxYC

    Plugin.yml : http://pastebin.com/kvqXfaN5
     
  2. Offline

    Codisimus

    You missed the @Override tag above the command method. I'm sure that if you watch the Youtube videos again, you will notice what I am talking about
     
  3. Offline

    beatON

    Hmm. Checked the video and it did not use an @Override tag.

    When i do add the tag i get an error - The method onCommand(CommandSender, Command, String, String[]) of type Core must override or implement a supertype method
     
  4. Offline

    Codisimus

    Repost your code and the error please.
     
  5. Offline

    beatON

  6. Offline

    L33m4n123

    1. import org.bukkit.material.Command;
    wong import.
    1. import org.bukkit.command.Command;
    2. import org.bukkit.command.CommandSender;
    are the ones you need for example
     
    Codisimus likes this.
  7. Offline

    beatON

    I have both the Command and CommandSender imports.
     
  8. Offline

    L33m4n123

    yes but the wrong Command import. Did not checked further then.. you have


    1. import org.bukkit.material.Command;
    but you need
    1. import org.bukkit.command.Command;
    spot the difference ;)
     
    beatON likes this.
  9. Offline

    beatON

    Thanks. Everything works now :)
     
Thread Status:
Not open for further replies.

Share This Page