I believe you are misunderstanding how @SideOnly functions. On the server this variable will literally not exist, and when the class is loaded, it will fail.