Jake finds out Doug Judy is getting married and he wasn't invited.
Jake confronts Doug about leaving him out. Doug tries to downplay the situation but eventually admits his other friends don't approve of his friendship with a cop.
Doug invites Jake to his bachelor party in Miami to make up for it. Mark Cuban loans Judy his private jet for the trip.
Jake poses as "Sean", Judy's friend from prison who was sentenced for elder abuse.
Holt is reinstated as captain but Terry accidentally threw away a business card that was important to him in his time in the office. He tries to recreate it so Holt doesn't know.
Amy's in charge of getting the precinct a new vending machine. Charles, Hitchcock, and Scully all pitch their ideas.
Amy chooses Hitchcock and Scully's fancy vending option.
The vending machine blows up in their faces.
Trudy Judy nearly blows Jake's cover when making a surprise appearance.
Doug's friends reveal they stole diamonds when he and Jake were checking in. They admit this in front of Jake, and Trudy reveals who he is.
They decide to enact a reverse heist so Jake won't get them in trouble. Ultimately, Jake betrays them and calls for backup.
Holt realizes Terry's card is faked because the message on the back is no longer there. The card represents the first person Holt let down as a cop and he kept it there as motivation.
Doug appears to be mad at Jake for arresting his friends and ruining his bachelor party.
Back at the precinct, Doug reveals the whole trip was a setup and he wanted Jake to arrest his friends.
Doug asks Jake to be his best man.