Jump to content
  • 0

TvT Event acis 399 error


Question

Posted

Hi,

 

Quote

java.lang.InterruptedException: sleep interrupted
        at java.base/java.lang.Thread.sleep(Native Method)
        at net.sf.l2j.gameserver.events.TvTEvent.waiter(TvTEvent.java:409)
        at net.sf.l2j.gameserver.events.TvTEventManager.waiter(TvTEventManager.java:150)
        at net.sf.l2j.gameserver.events.TvTEventManager.run(TvTEventManager.java:70)
        at net.sf.l2j.commons.pool.ThreadPool$TaskWrapper.run(ThreadPool.java:221)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

 

This shows up when shutting down or restarting the server. Does anyone know a solution and could help me?

8 answers to this question

Recommended Posts

  • 0
Posted (edited)

Won't cause you any problems, I imagine this is caused because your TvT event logic uses Thread.sleep() till next run of the event (which is beyond stupid) so when server shuts down it gets interrupted, therefore you get this error. I could be wrong though, can't tell for sure if we don't have the code.

 

It would only cause problems if there was data to be saved after the sleep() call, which I doubt.

Edited by An4rchy
  • 0
Posted
13 hours ago, Sonti said:

Hi,

 

 

This shows up when shutting down or restarting the server. Does anyone know a solution and could help me?

i would suggest you to use a different tvt event 

  • Haha 1
  • 0
Posted

 

I just found this on the internet few days ago.

 

TvT Acis 398 Yo: Sarada - Pastebin.com

 

It's hard to find a working TvT Event for acis 399+. The others from revision 382+ don't work for me, I don't know java to be able to do it myself. This one worked and generally everything works. 

 

A colleague Zake suggested not to use this code so I'm sure he knows and I'll listen to him.

Sorry for the late reply and thank you all for replying.

 

  • 0
Posted

The one you got will work just fine. What you can do is store the TvTEventManager task and cancel it on server shutdown manually so that you don't get InterruptedException. This error won't cause you any problems though.

  • 0
Posted (edited)

this code has some questionable functions and changes inside, thread.sleep and concurrent exceptions, i would not use it raw you should fix alot of things on this code.

 

the developer probably didnt know how to use enumerations and changed this

partyPlayer.setTeam(TeamType.NONE);

 

to this
partyPlayer.setTeam(0);

and that should be enough about this code to make you understand its not good quality.

 

Note: dont use random free stuff you find on the internet, you might damage your server.

:kim:peace✌

Edited by Nightw0lf
  • 0
Posted

I appreciate your reply.

 

From Nightw0lf's entry I understand that it's not worth using this code. I went one by one and had to change important things in the acis code. I'm changing it to the original version and looking for something better.

 

An4rchy I don't know Java, I do everything by copy paste and sometimes I shine and I don't know how 😛 Thank you for your answer, I'll try something myself with the internet.

 

I found another thing. I think this code is better but I will be grateful if you take a look at it.

Unfortunately, the code is incomplete and I don't even know what's missing.

 

https://pastebin.com/MTbQv2FJ

 

Thank you.

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
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  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...