Event bus security

This is literally the first Java code I've ever written, so please let me know if there's anything stylistic you'd like cleaned up.
I think this need to move to the top, or the previous if scope cannot see it :)