
/return
Ends a function early and sets its return value. Its basic form is /return fail; it has 2 syntax forms and 1 argument. Permission: Cheats / op 2.
/return syntax
Game dataEvery form the game accepts. Words in <angle brackets> are arguments you fill in; everything else is typed as is.
/return fail/return <value>/return arguments
What each argument expects, with the limits the game enforces.
| Argument | Expects | Limits |
|---|---|---|
<value> | Whole number | — |
Other commands
Data: Minecraft Java Edition 26.3 game files. How we source this
Ends a function early and sets its return value. It has 2 syntax forms and can be run by: Cheats / op 2.
See Also
Help us maintain accuracy! If you notice incorrect stats, missing data, or any issues, your feedback directly improves the quality of our data for the entire community.
/return FAQ (Java 26.3)
What does /return do in Minecraft?
Ends a function early and sets its return value.
What is the syntax of /return?
The basic form is /return fail. All forms are listed above.
Do you need cheats for /return?
Yes: Cheats / op 2. In singleplayer turn on Allow Cheats (or open to LAN with cheats).