Coding bukkit in java

Discussion in 'Plugin Development' started by jkjames6, Jan 28, 2014.

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

    jkjames6

    Hello!
    I have been starting to code in java and when I try a command it says nothing to me.
    Here's my only class: http://pastebin.com/kRiVgrHw
    Im quite new with this java stuff so please no hate ^_^
    Thanks
    James
     
  2. Offline

    SuperOmegaCow

    jkjames6 did you put the command in the plugin.yml
     
  3. Offline

    Blingdaddy1

    Well, first off, don't use commandLabel. Start your command like this

    if (cmd.getName().equalsIgnoreCase("cmd")) {

    commandLabel is getting the command alias.
     
  4. Offline

    1Rogue

    Follow a coding standard. Use proper spacing, and remember bracket syntax (semicolons don't come directly after "if" statements, you should have closing brackets, etc)
     
  5. Offline

    jkjames6

    Yea here's the plugin.yml http://pastebin.com/3fFD2EyA

    OO thanks i didn't see that sneaky ; come in there
    :D

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 6, 2016
  6. Offline

    HostelCraft

    ah you need to add this to the public void onEnable
    this.getConfig.addDefault(msg1, (Default Message);
     
Thread Status:
Not open for further replies.

Share This Page