NSW man admits terror charge, court threat