You know exactly the direction that your day is going to go when you go to Starbucks, tell them your name is Jeff and get a cup with "Jessica" scrawled on the side.

But while most of the time its annoying, a bungled name can sometimes, very rarely, become a source of inspiration.

SEE ALSO: 'Dumb Starbucks' Serves Up Piping Hot Mystery in L.A.

That's exactly what happened to Rogue One director Gareth Edwards, who had been tasked with the herculean task of naming the most prominent planet in the Star Wars film.

In various interviews, most recently with CNN, he told the story of going to Starbucks after he was told that he would get to name the end planet in Rogue One.

"I go over to get a coffee from Starbucks. I'm thinking, 'What could be the name? It could be this. Maybe we could use that?'" Edwards told CNN. Still in the crux of this creative turmoil, he went to get his drink and discovered that "Scarif" had been written on it.

"I must have said, 'It's Gareth,' but they heard 'Scarif.' They wrote 'Scarif' on the cup and I was like, 'That sounds like Star Wars,'" Edwards continued. He took his Starbucks, went back to work and immediately proclaimed that the final planet in Rogue One would be called Scarif.

And there you have it. Jyn Erso and crew were battling it out with stormtroopers on a planet named after a Starbucks mishap.

We'll leave you to process this information on your own.

WATCH: Use Jedi mind tricks to command this drone