Development Assistance NullPointerException Error

Discussion in 'Plugin Help/Development/Requests' started by Godbrandont, May 2, 2015.

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

    Godbrandont

    Hello. I have recently been developing a plugin and I keep getting a NullPointerException error around this chunk of code:
    [​IMG]
    I understand that a NullPointerException error is due to something wanted to be accessed however it is equal to null. But I can't seem to find out where this is happening.

    Here is the actual error returned:
    [​IMG]

    Any help would be appreciated. Thanks.
     
  2. Offline

    timtower Administrator Administrator Moderator

    Moved to Bukkit alternatives.
    @Godbrandont And what line are we talking about then?
    And why all the static?
     
  3. Offline

    Godbrandont

    I believe it's pointing at this line
    [​IMG]
    I thought it might be because it = 0, but then again that's not null, that's still a value, and I've tested it with 1, which returns the same error.

    And sorry if my code is crap and inefficient, I'm not good at that, I just make it so it works haha.

    Oh I'll also just add, this chunk of code is designed to go through each player online and add them evenly to either the Red or Blue team and teleport them to their spawnpoint. This is a minigame plugin, for an upcoming minigame server.
     
    Last edited: May 2, 2015
  4. Offline

    timtower Administrator Administrator Moderator

    @Godbrandont Try to use this instead of the images each time:
    [code] < code goes here > [/code]
    What is at Game.java on line 24?
     
  5. Offline

    Godbrandont

    Oh nevermind, this is on line 24:
    Code:
     plugin.stopCountdown(); 
    Which links to
    Code:
    public void stopCountdown(){
            getServer().getScheduler().cancelTask(startCountdownID);
        }
    
     
Thread Status:
Not open for further replies.

Share This Page