Error please help (eclipse) "First Plugin"

Discussion in 'Plugin Development' started by lucabunny77, Jun 1, 2014.

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

    lucabunny77

    Ok so I have setup the plugin fine it's just the plugin.yml the main: bit I know I put me.lucabunny77.EasyHub(as that's package name) then after I put .<class name> So my class name is EasyHub (with those caps) do I put it caps in plugin.yml or not cus when I do it says cannont find main class etc. tell me if you want the full error and thanks for helping!
     
  2. Offline

    XgXXSnipz

    Here let me model this for you, so the EasyHub is the class that
    Code:java
    1. extends JavaPlugin
    , if so then in your plugin yml it should be this
    Code:
    main: me.lucabunny77.EasyHub.EasyHub
    description:
    author:
    version:
     
    commands:
        
    Hope I helped
     
  3. Offline

    lucabunny77

    didont help... Here's my yml:
    main: me.lucabunny77.EasyHub.EasyHub
    version: 1.0
    author: lucabunny77
    description: So Easy!
     
  4. Offline

    Rocoty

    Which package is your main class in?
     
  5. Offline

    lucabunny77



    It's not in anything I don't think yml is in src
     
  6. Offline

    Rocoty

    If the main class is not in a package then all you need to type for the main key in the plugin.yml is the main class' name.
     
  7. Offline

    lucabunny77

    So my class name is EasyHub so your saying I type what I did before but didont work: me.lucabunny77.EasyHub.EasyHub
    Package name:me.lucabunny77.EasyHub
    Class name:EasyHub
     
  8. Offline

    JBoss925

    Where is your yml? Is it in me.lucabunny77.EasyHub too? Because it's supposed to be in the src folder.
     
  9. Offline

    lucabunny77

    Yes it's in the src folder
     
  10. Offline

    JBoss925

    Can you screen shot your directory? Like the tab on the left side of your screen if you're on eclipse?
     
  11. Offline

    lucabunny77

    You want me to screenshot the code????

    You want me to screenshot the coding??!

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

    AoH_Ruthless

    JBoss925
    It actually doesn't have to be in a source folder.

    lucabunny77
    He wants you to screenshot the project hierarchical tree

    Also, don't bump your posts more than once every 24 hours.
     
  13. Offline

    lucabunny77

    I don't understand project hierarchical tree what is that cus I'm new so...
     
  14. Offline

    JBoss925

    For real? Because I tried it once and got an error saying it couldn't find my plugin.yml and then I put it in the src and it worked. Idk maybe I messed up even worse. It was a long time ago.
     
  15. Offline

    AoH_Ruthless

    JBoss925
    Must have been something wrong with your code, i.e multiple classes extending JavaPlugin.
     
  16. Offline

    JBoss925

    Yeah, I was a noob back then:D
     
  17. Offline

    AoH_Ruthless

    JBoss925
    We're all noobs, and we'll never stop being noobs until we know everything, which will never happen :)

    Edit: Man, that was some philosophical s**t :p
     
    dsouzamatt, Gnat008 and es359 like this.
  18. Offline

    JBoss925

    Haha, it's true. One can only hope to become a lesser noob. And yes very philosophical :p
     
  19. Offline

    lucabunny77

    Yea moving on what did he mean bye that tree thing
     
  20. Offline

    JBoss925

    That tab on the left side of the eclipse window. It has all the package names and stuff.
     
  21. Offline

    Rocoty

    lucabunny77 Can you post the full error, like you suggested in your first post?
     
    es359 likes this.
  22. Offline

    lucabunny77

    it says when I load up server could not load 'plugins/EasyHub.jar in folder 'plugins' org.bukkit.plugin.InvailedPluginException: cannot find main class 'me.lucabunny77.EasyHub.EasyHub'
     
  23. Offline

    Rocoty

    And can you tell me the exact path to the main class? Ideally post it in its entirety.
     
  24. Offline

    lucabunny77

    Do you mean in yml? If so:
    me.lucabunny77.EasyHub.EasyHub
     
  25. Offline

    Rocoty

    No. I mean the actual path. Can you post the main class?
     
  26. Offline

    lucabunny77

    I don't know what you mean sorry :(
     
  27. Offline

    Rocoty

    Go into your main class. Select all the code. Copy. Go here. Click the code button. Paste. Send. Alternatively just copy the very first line in the main class.

    Or as someone else suggested, take a screenshot of the directory tree.
     
  28. Offline

    lucabunny77

    I'm not sure how to take a screenshot. Do you want me to send you like the coding I've done? (Sorry)
     
  29. Offline

    Rocoty

    Yes. And google can help you with screenshots if you need that
     
  30. Offline

    lucabunny77

    Witch line do you want??? Is this it?
    public class EasyHub extends JavaPlugin{
    If not wouldn't it be better to send you all the code ?
     
Thread Status:
Not open for further replies.

Share This Page