Jump to content

[Client thread/FATAL]: Error executing task - FORGE 1.8.9


Erol

Recommended Posts

Good evening!

 

I tried to implement scheduled(delayed) tasks in my code and now every few seconds I get this message in terminal. I am using eclipse. The scheduled task seems to work fine I am just scared that this mod won't make too much for people using it.

If anyone could figure out 

 

Initializing(if this is correct term) the timer:

private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);

 

The delayed function:

        void DelayedTask() {
         		//flag=false;
        	System.out.println("CHECK1");
        		if(DntbMod.DoQuests) {
        			m.thePlayer.sendChatMessage(GetGame());
        		}
        		else{m.thePlayer.sendChatMessage(DntbMod.komanda);}
        	}

Calling the delayed function:

sleep= 3000+(long)(Math.random()*5000);	   
scheduler.schedule(new Runnable() {public void run() { DelayedTask(); }}, sleep, MILLISECONDS);

 

Thank you for your help.

Erol

fatalerror.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.