Instead of doing this here, do this in the overridable method hook(), which is called once per event, per server start. Using bind() happens every time the event is bound in user code, so you can get rid of this thread check, which won't always be correct anyways, because threadRunning isn't static. Also, it appears as though you have no way to shutdown the thread. You'll need to do that in a StaticLayer.GetConvertor().addShutdownHook(), which will kill the thread. The reference to the thread should be static, so there's only one.