Realised the importance of "if(!world.isRemote)".