Error - Btw i'm a beginner so its probally something easy :P

Discussion in 'Plugin Development' started by castletaker11, Nov 7, 2013.

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

    castletaker11

    So, im a new coder and i've watched a vid or two to make a simple plugin where you do /hub not /spawn.
    Now, as i am a noob i've got an error: :(
    [​IMG]
    plugin.yml:
    [​IMG]
    coding:
    [​IMG]

    Note: remember that the post is also scrollable left and right!
     
  2. In plugin.yml in main: you have to point main class. In your case MAIN CLASS is "main" so main parameter in plugin.yml should looks like that:
    main: me.BenLumsden.Tutorial.main
     
  3. In your plugin.yml you didn't specify your Main class correctly. Change what you have for main to:

    me.BenLumsden.Tutorial.main

    You include your package followed by the name of your main class
     
  4. Offline

    TheCombatCA

    In the plugin.yml the correct way of doing that is like this:
    Code:Java
    1. title: TITLE
    2. main: me.Benlumsden.Tutorials.Tutorial
    3. author: AUTHOR
    4. version: VERSION
    5. //Once I get home I'll edit this post for the other necessities
     
  5. Offline

    Windy Day

    Your path to you main class should be:
    me.BenLumsden.Tutorial.Main

    Explanation: You have bukkit looking for the class "tutorials" in the package me.BenLumsden.Tutorial . You can tell the main in the yml is wrong because the error in the console says ClassNotFound. and upon looking at where you are directing it you see you have your class named "Main". Simple change it to main so that bukkit will find your class.
     
  6. Ok guys I think he gets the point. He doesn't need 4 people to tell him the same thing :p
     
  7. Offline

    Windy Day

    Ha you sure?
     
  8. Offline

    castletaker11

    Last edited by a moderator: Jun 5, 2016
  9. Offline

    The_Doctor_123

  10. Offline

    castletaker11

  11. Offline

    The_Doctor_123

    castletaker11
    Ah, I believe you need a space between "main:" and your class name.
     
  12. Offline

    castletaker11

  13. Offline

    The_Doctor_123

    castletaker11
    I see another issue, your class is called "main" but you said it was "Main" in the plugin.yml. Java is case sensitive.
     
  14. Offline

    castletaker11

    The_Doctor_123
    that didn't work i just got back to square one

    The_Doctor_123
    wont reply for a bit coz i gotta go for t (20-30 mins)

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

    The_Doctor_123

  16. Offline

    castletaker11

    The_Doctor_123
    ok im back

    The_Doctor_123
    that worked
    however, i got a new error
    i will post it in one sec

    The_Doctor_123
    here we go:
    error:
    [​IMG]
    plugin.yml:
    [​IMG]
    do u require anything else?

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

    The_Doctor_123

    Looks like you're compiling at a higher version of Java than you're running at. You're probably compiling with Java 7 and running with Java 6.

    castletaker11
    Huh?

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

    castletaker11

  19. Offline

    The_Doctor_123

    castletaker11
    You need to compile with Java 6 or run the plugin with Java 7.
     
  20. Offline

    castletaker11

    The_Doctor_123
    if you observer my first post last picture.
    On the right it proves i am running on java7, i think
     
  21. Offline

    The_Doctor_123

    castletaker11
    I don't see anywhere that you're running Java 7, but I do see that you're compiling with Java 7 in your pictures.
     
  22. Offline

    1Rogue

    Compile with Java 6 instead. That is what bukkit and minecraft are built off of.
     
  23. Offline

    castletaker11

    Last edited by a moderator: Jun 5, 2016
Thread Status:
Not open for further replies.

Share This Page