Code debug help[

Discussion in 'Plugin Development' started by crushh87, Jan 29, 2013.

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

    crushh87

    So I am attempting to get some locations from the config and I have got this code made here
    Code:java
    1.  
    2. World LobbyLocworld = Bukkit.getServer().getWorld(plugin.getConfig().getString("lobbyLoc.world"));
    3. lobbyLoc = new Location(LobbyLocworld,getConfig().getDouble("lobbyLoc.X"),getConfig().getDouble("lobbyLoc.Y"),getConfig().getDouble("lobbyLoc.Z"));
    4.  

    No errors on start up but I get a nullpointer on the first line show above^ So this means that something is null, the only thing that could be null is the Location, but the Location is set.

    If this makes no sense let me know...
     
  2. Offline

    MCForger

    crushh87
    Try Checking if the world is null before making the new location.
     
  3. Offline

    crushh87

    I knew someone was going to say that, I already have a thing set up to check that.
     
  4. Offline

    MCForger

    Well I didnt see it in the code so could have not known that =P
     
  5. Offline

    crushh87

    any other ideas?
     
  6. Offline

    crushh87

    Hate doing it but, Bump?

    _Bump_

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 31, 2016
Thread Status:
Not open for further replies.

Share This Page