I need your help

Discussion in 'Spigot Plugin Development' started by AlexanderH1512, May 13, 2017.

  1. I have no idea why my plugin is doesen`t working. Please help!

    The Error:

    Code (Text):
     Could not load 'plugins\lobby.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.NullPointerException
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:135) ~[lobby.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[lobby.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [lobby.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:292) [lobby.jar:git-Spigot-db6de12-18fbb24]
        at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:198) [lobby.jar:git-Spigot-db6de12-18fbb24]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:525) [lobby.jar:git-Spigot-db6de12-18fbb24]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_131]
    Caused by: java.lang.NullPointerException
        at com.lobby.main.Main.<init>(Main.java:53) ~[?:?]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_131]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_131]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_131]
        at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_131]
        at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_131]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:76) ~[lobby.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[lobby.jar:git-Spigot-db6de12-18fbb24]
        ... 6 more
    What means this????
    Your AlloGaming
  2. Can you please share your code from the Main class?
  3. Code (Text):
    Caused by: java.lang.NullPointerException
        at com.lobby.main.Main.<init>(Main.java:53) ~[?:?]
    Line 53 in your com.lobby.main.Main file throws an error, and not just any error. A NPE :D
    Just check the data at that line, and check if the arguments / variables are not null.
    • Winner Winner x 1
  4. Put the code from your Main class on Paste/Haste Bin
    and someone will point out the issue.
  5. Bonus points for your signature xD
  6. WAS


    For some reason this made me laugh to hard and just simply made my day. xD
    • Agree Agree x 2
  7. Ok thanks I post the main class at noon. When i can't fix this.
  8. Indeed, the only different is that I am not asking to be spoonfed,
    I'm asking for the code in the Main class so that I/WE and identify the cause
    of the NPE ;)
  9. I wasn't accusing you of that xD I just like the signature
  10. Oh, thanks :D
  11. Thanks Guys. I made a little mistake in the main class, but it is now working :)
  12. Great! Close Thread As Solved.
  13. yeah line 53 has an error
  14. Good job Sherlock

    Just joking :D