Minecraft Wiki

The Minecraft Wiki has moved from Fandom; see the linked discussion page for details.

READ MORE

Minecraft Wiki
Advertisement
Information icon
This feature is exclusive to Java Edition. 
This article is missing information about op level of the command. 
Please expand the article to include this information. Further details may exist on the talk page.
This article is missing information about result, output & examples sections. 
Please expand the article to include this information. Further details may exist on the talk page.

Command that can be used to control execution flow inside functions and change their return value

Syntax

/return <value>
Skips remaining separate top-level commands in the currently executing function (if any)
Changes the result value of the function command that triggered the execution from the number of commands executed to the value
The result value of the return command is also the value

History

Java Edition
1.2023w16aAdded return.
Advertisement