Need help with error Unsupported major.minor version 51.0

Discussion in 'Plugin Development' started by aPandaification, Jun 12, 2012.

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

    aPandaification

    So I searched this error and other people had the problem but I did not find any solutions.
    What someone said was that my methods and such are out of date which is entirely possible because I am just trying to get an old plugin to work but tailor it to my needs.

    The error: http://pastebin.com/F1LYiJeD

    my main method: http://pastebin.com/wPi0Y7UM

    enchant class: http://pastebin.com/bNxdCLFr

    inv helper: http://pastebin.com/rWqr9xT4

    util class: http://pastebin.com/cJFKvGYn

    I am not new to java but I am new to plugins so be gentle when you yell at me for being stupid. Thanks :)
     
  2. Offline

    r0306

  3. Offline

    aPandaification

  4. Offline

    r0306

  5. Offline

    aPandaification

    I am compiling with 7 but I heard I have to compile with 6 which I don't know how...

    EDIT: I'm using eclipse
     
  6. Offline

    r0306

    aPandaification
    Click on the preferences button on the top toolbar and navigate here:
    [​IMG]
     
  7. Offline

    DrAgonmoray

    Right click the project, Build Path - > Configure Build Path, press the Libraries tab, click on JRE System Library [JavaSE-1.7] then press Edit... (on the right), then for Execution Environment select JavaSE-1.6
     
  8. Offline

    chenr1

    It means you are ompiligng for java 7 but are using it for java 6.
     
  9. Offline

    aPandaification

  10. Offline

    r0306

    aPandaification
    Make sure that your files are all in their correct places and that you've exported them correctly. Try reopening the compiler and compiling the JAR again.
     
  11. Offline

    aPandaification

    I tried that and it doesn't seem to do anything :/
     
  12. Offline

    r0306

  13. Change
    main: me.aPanda.PandaEnchant.Panda
    to
    main: me.aPanda.PandaTheEnchanter.Panda
    in the plugin.yml
     
    r0306 likes this.
  14. Offline

    aPandaification

    XD thanks

    Now I'm getting a null pointer exception about an not handled event...
    Error: http://pastebin.com/Uf9xzbd7

    the code from above is the same minus the yml that I fixed thanks to V10lator <3

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
  15. perms is null cause you never called setupPermissions()
     
  16. Offline

    aPandaification

    Ohhhhh ok let me try and figure it out :D

    Okay I got the permissions to work but it seems like the ea command is giving me problems and it has more errors associated with it but I don't know how to fix them :/

    Error: http://pastebin.com/x54A2db8

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

    aPandaification

    I tracked down the problem areas yet i see nothing wrong (granted I am a newbie at this) it is a null pointer exception but I don't understand why...


    main: http://pastebin.com/9UamAszS

    enchant: http://pastebin.com/LVck51TE

    InvHelper: http://pastebin.com/tVCaG8t5

    Util: http://pastebin.com/pciZ3Vj9

    yml is the same -
     
  18. You read the link (just the first post, it's really helpfull)? Cause that would say line 23 in Util.java causes the error, which is impossible as this is an empty line. So the error is not from the code you gave me. :(

    Anyway, I think I know the error: Add
    Util.Initialize(this);
    to onEnable, cause you're never calling that, hence server is null.
     
  19. Offline

    aPandaification

    Ya I did read it and it was super helpful - I will try the initialize thing - thanks for the help :)

    welp it stopped the error but now when I run the command literally nothing happens... and by nothing I mean nothing - no item no error no mesage nada. Not sure what else to do XD.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
  20. What should happen instead? You command code doesn't give any feedback to the executor... :p
     
  21. Offline

    aPandaification

Thread Status:
Not open for further replies.

Share This Page