With survival turned off, the Fullness (hunger) and Hydration stats do not affect your character (your character instead always has 100% of both). This means your character does not need to eat or drink. Survival is turned on by default.
The syntax for the survival command is as follows:
survival [on / off]
This command has the following arguments:
|On / Off||Specify 'on' here (without quotes) to enable Survival (default). Specify 'off' here (without quotes) to disable Survival stats, making you not need to consume food or drink.|
Find below working examples of the survival command.
Using the above command would turn Survival stats off, meaning you won't need to eat or drink.
The above command would turn Survival mode back on (it is turned on by default when you start a game).