Fix for multithreaded server

this code wasn't playing nice with the multithreaded nature of spigot. updated this and built it, appears to be working fine on my server. obviously has not been extensively tested but the error was dealt with and CPU usage is significantly reduced.