Hastings man sentenced for making threats