Config Null Pointer Exception

Discussion in 'Plugin Development' started by blake852369, Feb 19, 2015.

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

    blake852369

    Hi Everyone! So I'm coding this plugin and I'm trying to access a location from the config by having the coordinates and world stored in the config. Whenever I try to access it (Via a inventory click event) there is a null pointer exception. Here is the stack trace:
    Code:
    19.02 20:20:44 [Server] INFO at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_05]
    19.02 20:20:44 [Server] INFO at me.DoYouEvenDev.QuickWarp.Teleport(QuickWarp.java:63) ~[?:?]
    19.02 20:20:44 [Server] INFO Caused by: java.lang.NullPointerException
    19.02 20:20:44 [Server] INFO at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [craftbukkit_beta.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    19.02 20:20:44 [Server] INFO at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:469) [craftbukkit_beta.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    As you can see the errors are at line 71 of QuickWarp and at line 48 of Teleport in the Vanished Method here are those Images:
    Code:
        
            int x = core.getConfig().getInt("Vanished.x");
    
    Code:
        
    
                        Teleport.Vanished(player);
    
    
    Please help me get this fixed! I really am having a hard time figuring out what is wrong
     
    Last edited: Feb 19, 2015
  2. Offline

    Skionz

    Your images aren't working.
     
  3. Offline

    blake852369

    thanks! fixed
     
  4. Offline

    Skionz

    @blake852369 Please use naming conventions and fix the redundant checks. Give us a specific line.
     
  5. Offline

    blake852369

    there now?
     
  6. Offline

    teej107

  7. Offline

    jimbo8

    The stacktrace tells you to have a look at line 63, please show us that line. ;)
     
Thread Status:
Not open for further replies.

Share This Page