This command adds a thirst bar to your survival world in only one command! There are 4 phases in which you can get dehydrated. In the first fase you will get slowness after 5000 game ticks. The second stage occurs after 10000 game ticks in which you will get a weakness effect. After 13000 game ticks you will get a lot slower at mining. The 4th and final stage will occur at 15000 game ticks where you will get a nausea effect. This adds a new view to minecraft in which you must drink to stay alive.
If you want an actual thirst bar type the following command in chat. /scoreboard objectives setdisplay sidebar water.
For Minecraft 1.10.2