Need help with a very simple plugin!

Discussion in 'Plugin Development' started by SirWallie, Mar 24, 2013.

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

    SirWallie

    I'm fairly new to Bukkit and have finally been able to try my hand at coding my own plugin!
    The problem is, it doesn't work... (Oh nooooesssss)
    According to Eclipse everything is perfect in my code but i'm getting these errors in the console on my test server:

    03:44:54 [SEVERE] Could not load 'plugins\HelloMinecraft.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: com/gmail/(this is where my email would be(just the part before the '@' symbol))/hellominecraft/HelloMinecraft : Unsupported major.minor version 51.0
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:184)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230)
    at org.bukkit.craftbukkit.v1_4_R1.CraftServer.loadPlugins(CraftServer.java:239)
    at org.bukkit.craftbukkit.v1_4_R1.CraftServer.<init>(CraftServer.java:217)
    at net.minecraft.server.v1_4_R1.PlayerList.<init>(PlayerList.java:55)
    at net.minecraft.server.v1_4_R1.DedicatedPlayerList.<init>(SourceFile:11)
    at net.minecraft.server.v1_4_R1.DedicatedServer.init(DedicatedServer.java:104)
    at net.minecraft.server.v1_4_R1.MinecraftServer.run(MinecraftServer.java:399)
    at net.minecraft.server.v1_4_R1.ThreadServerApplication.run(SourceFile:849)
    Caused by: java.lang.UnsupportedClassVersionError: com/gmail/(another place where my email would be)/hellominecraft/HelloMinecraft : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(Unknown Source)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader.java:80)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:53)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:173)
    ... 9 more

    I'm assuming it has to do with the way I named everything? I used my email because I don't have my own website (yet) and using my email seemed easier than setting up a GitHub account. Is this what I need to do or am I just noobing out and missing something?
     
  2. Offline

    Nitnelave

    Are you talking about the package name? Like org.bukkit.somthing or net.minecraft.server?
    You don't have to have a website or anything. In fact, the package name has nothing to do with internet at all.
    A standard is com.yourname.yourproject
    You can then create more packages :
    com.yourname.yourproject.block with all the classes concerning blocks
    com.yourname.yourproject.listener
    etc...
     
  3. Offline

    dxwarlock

    Unsupported major.minor version 51.0

    Your Java you complied with, is higher than the one the server uses.
    You probably have 1.7 on the machine you coded on, and 1.6 on the server.
     
  4. Offline

    crushh87

    Naming has nothing to do with it. if you wanted you could name your package

    pieeater67.ilikemuffins.chickens

    it's your java version as stated by dxwarlock
     
  5. Offline

    SirWallie

    Thank you all, I feel like such a noob now xD
     
Thread Status:
Not open for further replies.

Share This Page