Solved Simple Bukkit plugin compile errors!

Discussion in 'Plugin Development' started by croc122, Oct 7, 2014.

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

    croc122

    I am new to programming in Java and am following along with a book called "Learn to Program with Minecraft Plugins". The book is really helpful most of the time, but still leaves me frustrated when I get errors. I would appreciate any help you can give me, thank you in advance! It is being compiled against 1.7.10 Spigot.

    I have posted the errors I got when trying to compile with javac here
    http://pastebin.com/Wrbbf8t6

    And the entire code of the plugin (really short, only 39 lines) is here
    http://pastebin.com/ivb6NdKy
     
  2. Offline

    teej107

    What is the problem exactly?

    Btw, your book I would say is a little outdated. You can make your code a whole 3 lines shorter by getting rid of these:
    Code:java
    1. public static Logger log = Logger.getLogger("Minecraft");
    2. log.info("[FireBow] Server reloaded.");
    3. log.info("[FireBow] Server stopping.");

    Trust me. It's not just about making your code shorter.
    • Stop stealing Minecraft's logger. Use your own plugin's logger - getLogger()
    • You don't need to log that your plugin is enabled. Bukkit already does this for you.
     
  3. Offline

    croc122

    teej107

    I posted the errors I got when I tried to compile with javac, but I don't understand them. If you could tell me what they mean, that's a start!
    Errors: http://pastebin.com/Wrbbf8t6

    I figured it out. Apparently I needed to add some more import statements that the book did not show in the example plugin.

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

    teej107

  5. Offline

    croc122

    teej107 no I am not. Just compiling with javac. Which IDE do you recommend for the future: Eclipse or Netbeans?
     
  6. Offline

    fireblast709

    croc122 Try out both of them and pick whichever you prefer (note: IntelliJ is a third, pretty popular IDE that you might want to try).
     
  7. Offline

    teej107

    croc122 I use Eclipse, I haven't had any problems with it so I'm fine with it. Choose the IDE that you are fine with.
     
Thread Status:
Not open for further replies.

Share This Page