vsams14/SunBurn — pull request #1 by warezthebeef (2013-02-05 00:42:09+00:00)
Title: Fixed exceptions caused by non-threadsafe asynchronous code

We were having problems with BurnMain accessing bukkit/MC data in a non-threadsafe manner while inside an asynchronous task. This would cause a lot of exceptions to be thrown in the server log when other code happened to be accessing the same data. The errors weren't fatal, they would just cause burn and world time changing events to fail once in a while as well as fill the log with messy exception backtraces.

I couldn't find anything in the code that suggested it would block processing for any great length of time so decided to move the functionality in BurnMain into synchronous tasks where it wouldn't cause any problems. We've been running the plugin like this without error (on the latest bukkit-1.4.7-RC1.0) for nearly a week now. There's been no noticable decrease in server performance either so I'm not entirely sure why these tasks were asynchronous in the first place. As far as we're concerned it's fixed :)

I also updated a few deprecated method names to prevent warnings in eclipse, no major problems there but it needed to be done.

Would be great to get these updates included in the main branch unless you have a good reason not to!

Many thanks for SunBurn, our server wouldn't be the same without it.