Last August, Knicks owner James Dolan flew to Puerto Rico to support and participate in Carmelo Anthony’s charity endeavors.

Dolan got so into it, he even participated in Anthony’s softball charity classic there, and played second base. Not only did Dolan attend, but so did assistant general manager Allan Houston and coach Mike Woodson. Anthony’s idol, Bernard King, was there, too.

All of that could pay off this summer. Dolan was in New Orleans all weekend getting ideas for when the Garden co-hosts All-Star Weekend next year, and is joining the team in Memphis in advance of Thursday’s trade deadline.

Anthony, in his most important remarks of the season, said Friday he is willing to take “a pay cut’’ and re-sign with the Knicks if he believes in Dolan’s future plan to reload. And it will take Anthony to be imaginative to believe Dolan has a surefire plan that will make the Knicks a title contender.

Anthony, who scored 30 points — including an All-Star Game record eight 3-pointers — in the East’s 163-155 triumph over the West Sunday night, appreciates the Knicks’ ownership and how much Dolan has done for him, so it is easy to believe when he pulled on his navy blue East jersey, it wouldn’t be for the last time.