Your cruise line will have the answers. Do not trust answers from unqualified people.
Usually as long as you go on accompanied shore visits you don't need visa as the ship holds your passport while you are ashore. If you go on your own you need a visa.
Check with your cruise line - it is very important!