Development Assistance Server Can't Load My Plugin?

Discussion in 'Plugin Help/Development/Requests' started by scarabcoder, Dec 14, 2014.

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

    scarabcoder

    Hello,

    I was making a quick plugin for my server (I have made tons of plugins before, I just started on a new computer), but for some reason it gets an error when it tries to load the plugin.
    It says it can't find the main class (me.scarabcoder.vertoak.Vertoak), but I looked in the jar file using 7-zip and I there is the folder 'me/scarabcoder/vertoak/Vertoak.class'.
    I have added JDK to the build path, and it is exporting src along with everything else.
    I have no idea what is wrong! I am using Spigot 1.7.10 as the API, here is the code:

    Vertoak.java:

    Code:
    package me.scarabcoder.vertoak;
    
    import org.bukkit.event.Listener;
    import org.bukkit.plugin.java.JavaPlugin;
    
    public class Vertoak extends JavaPlugin implements Listener{
    
    }
    
    plugin.yml:

    Code:
    name: Vertoak
    main: me.scarabcoder.vertoak.Vertoak
    version: 1.0
    
    I really need this to work! :(
     
  2. Offline

    tcvs

    @scarabcoder Well it seems like there is not much to load if that is your main class. you would need an onEnable method and maybe print out a message that it is enabled.
     
  3. Offline

    scarabcoder

    I've already done that, it still doesn't work.
     
  4. Offline

    tcvs

    @scarabcoder Well then please post your entire code not just your empty main class.
     
  5. Offline

    scarabcoder

    The problem does not lie with the code, it lies with the exporting.
    But here is some filled code:

    Code:
    package me.scarabcoder.vertoak;
    
    import org.bukkit.Bukkit;
    import org.bukkit.event.Listener;
    import org.bukkit.plugin.java.JavaPlugin;
    
    public class Vertoak extends JavaPlugin implements Listener{
        public void onEnable(){
            Bukkit.broadcastMessage("Vertoak 1.0 enabled!");
        }
    }
     
  6. Offline

    mrCookieSlime

    Moved to Alternatives Section.
     
  7. Offline

    scarabcoder

    It is pretty much the same, right?
    I used Spigot cause Bukkit is down.
    I pretty much thought the APIs weren't too different.
     
  8. Offline

    mrCookieSlime

    @scarabcoder
    Bukkit and Spigot are not the same.
    Now don't turn this into another Bukkit vs. Spigot discussion.
     
  9. Offline

    scarabcoder

    @mrCookieSlime Okay okay....
    But in this case, does it matter which one I use? I also used Cauldron, and it still doesn't work. I don't think it has anything to do with the kind of Craftbukkit API I use, I think it has something to do with how it is exporting.
     
  10. Offline

    mrCookieSlime

    @scarabcoder
    It indeed has nothing to do with the API you are using, I am just following the rules by moving this Thread...
    However when you export did you mark "export generated class files" and unmarked "export source"?
     
  11. Offline

    scarabcoder

    I have "Export Generated Class Files" marked, but I can't find "Export Source".
     
Thread Status:
Not open for further replies.

Share This Page