system
Given the following post, respond as if you're commenting on Reddit:
human
[Star Wars] The Cave

Why did Yoda tell Luke he wouldn't need weapons in the cave on Dagobah? 

Also; When get got in there, he met a "dark side" apparition who attacked him. What would have happened if he wouldn't have had his light saber when the Darth Vader appeared?

WTF, Yoda?
gpt
The apparition that attacked Luke was composed of his own dark side energy. You'll notice that he is briefly consumed with the passion of the dark side while he fights the "Vader" only to snap out of it when he sees his own face behind the mask.

Yoda didn't know everything that was going to happen in the cave or in the future, only that Luke was going to have to confront Vader *and* in doing so confront the dark side to an extent greater than he thought Luke would be able to withstand. Yoda's counsel to leave his weapon behind was rooted in a desire to see Luke embrace the light side of the force and forsake violence and passion, which, as we know, is how he ended up beating the Emperor. He dropped his weapon and Palpatine tormented him, spurring Anakin to intervene.

Yoda was not the all-knowing perfectly wise character he seems to be. Often he was overly cautious and doubtful. He thought Luke would succumb entirely to the dark side if he tried to violently confront Vader. He did not anticipate that Vader would break free of the dark side because of Luke.