Need help just started

Discussion in 'Plugin Development' started by 7cardcha, Mar 9, 2012.

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

    7cardcha

    Ok I want to start using the bukkit api. I have about a year of C++ experience but very little java experience.
    I created a new project, added a package, added a class to that package and added a plugin.yml to the project. Then I linked with the latest bukkit jar. Then I added some code the my class file. Here it is.


    package charles;


    import org.bukkit.plugin.java.JavaPlugin;

    public class TestPlugin extends JavaPlugin
    {
    public void onEnable(){

    System.out.println("Enabled mofo");
    }

    public void onDisable(){
    System.out.println("Disabled mofo");
    }
    }



    My plugin.yml is.


    name: Test
    main: charles.TestPlugin
    version: 1.0
    commands:


    I exported the project as a jar file then added it to my plugins directory in my bukkit server. Here is the error I get.


    174 recipes
    27 achievements
    23:50:41 [INFO] Starting minecraft server version 1.1
    23:50:41 [INFO] Loading properties
    23:50:41 [INFO] Starting Minecraft server on *:25565
    23:50:42 [INFO] This server is running CraftBukkit version git-Bukkit-1.1-R6-b19
    88jnks (MC: 1.1) (Implementing API version 1.1-R6)
    23:50:42 [SEVERE] java.lang.NullPointerException
    23:50:42 [SEVERE] at org.bukkit.plugin.PluginDescriptionFile.loadMap(Plugi
    nDescriptionFile.java:203)
    23:50:42 [SEVERE] at org.bukkit.plugin.PluginDescriptionFile.<init>(Plugin
    DescriptionFile.java:40)
    23:50:42 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.getPluginDesc
    ription(JavaPluginLoader.java:198)
    23:50:42 [SEVERE] at org.bukkit.plugin.SimplePluginManager.loadPlugins(Sim
    plePluginManager.java:132)
    23:50:42 [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftS
    erver.java:206)
    23:50:42 [SEVERE] at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer
    .java:182)
    23:50:42 [SEVERE] at net.minecraft.server.ServerConfigurationManager.<init
    >(ServerConfigurationManager.java:53)
    23:50:42 [SEVERE] at net.minecraft.server.MinecraftServer.init(MinecraftSe
    rver.java:147)
    23:50:42 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftSer
    ver.java:407)
    23:50:42 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(Sour
    ceFile:465)
    23:50:42 [SEVERE] Unexpected exception
    java.lang.NullPointerException
    at org.bukkit.plugin.PluginDescriptionFile.loadMap(PluginDescriptionFile
    .java:203)
    at org.bukkit.plugin.PluginDescriptionFile.<init>(PluginDescriptionFile.
    java:40)
    at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPlug
    inLoader.java:198)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:132)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:206)
    at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:182)
    at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigur
    ationManager.java:53)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:147)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:407)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    >


    Sorry for being such a java/eclipse/bukkit idiot.
     
  2. Offline

    xzKinGzxBuRnzx

  3. Offline

    7cardcha

    NVM found the problem. It wasn't the yml file. I was exporting the jar incorrectly.
     
Thread Status:
Not open for further replies.

Share This Page