Problem/Bug Scheduler makes problems

Discussion in 'General Help' started by 0LUMIN4T0R, Sep 19, 2015.

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


    Hey Folks,
    i have a Problem with my plugin. There is an error Code because of this:
    int sched;
    public void updateScoreboard(Player p){
            obj.setDisplayName(ChatColor.GREEN + "Score");  
            Score Gelb = obj.getScore(Bukkit.getOfflinePlayer(ChatColor.YELLOW + "Gelb"));
        public void onJoin(PlayerJoinEvent e){
            Player p = e.getPlayer();
            sched=Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable(){
                public void run() {
            }, 20L, 20L);
    I hope you can help me:oops:
  2. Offline


    Red squiggly underline in your IDE?
    Null pointer error thrown pointing to one of those lines when loading the plugin at startup? When a player joins?
    Index out of bounds error? Overflow? Can not cast object to .. error? Complaints about this line

    due to board not being an object that is within scope /defined for this function? Its 100% pure total butt-scented grabs out of the ..air.. to take a guess at the type of error, nature of the error, and cause of the error when there isn't enough code context to make any assessment ("What, no, board is defined, its actually a few lines above where i copied, and its value is assigned in a funtion that isn't shown here either")

    Without knowing the type of error the server is throwing and to what line it refers, can't begin to say "That means you haven't initialized x by the time this code is launched" or such.

    Potentially you have a couple null errors here -- board or plugin may not be defined/given value /within scope of this code in your scheduler statement
  3. Offline


    What even is this formatting, I don't even

    ps: Check return value of scheduleSyncRepeatingTask
Thread Status:
Not open for further replies.

Share This Page