Commands/title

Controls screen titles.

Screen titles are displayed to players as a single line of large center-aligned text in the middle of their displays and can include a second line of text called a "subtitle". Both lines are specified using complicated formatting. Screen titles can be set to fade in and fade out, and the duration they are displayed can also be specified. Screen titles scale in size with the GUI Scale and screen titles which are too big to fit on the screen are not line-wrapped (they just overflow off the screen on both sides).


 * Syntax


 * The command has six variations, each with different arguments.


 * Java Edition
 * (removes the screen title from the screen)
 * (resets options to default values)
 * (displays the text as the title position)
 * (displays the text in the subtitle position)
 * (displays the text as the action bar position)
 * (specifies fade-in, stay, and fade-out times)


 * Bedrock Edition
 * (removes the screen title from the screen)
 * (resets options to default values)
 * (displays the text as the title position)
 * (displays the text in the subtitle position)
 * (displays the text as the action bar position)
 * (specifies fade-in, stay, and fade-out times)


 * Arguments


 * player (BE: player: target)
 * Specifies the player(s) to display a screen title to. Must be a player name or target selector.


 * raw json title (BE: titleText: string) (, , and   mode only)
 * Specifies the text to display as a title, subtitle, or on the action bar. Must be valid raw JSON text (for example, ).


 * fadeIn, stay, and fadeOut (BE: fadeIn: int, stay: int, and fadeOut: int) ( mode only)
 * Specifies the time in game ticks (1/20ths of a second) for the screen title to fade in, stay, and fade out. All values must be between -2,147,483,648 and 2,147,483,647 (inclusive, without the commas), but values below 0 will be treated as 0. If not specified (or if reset), defaults to 10 (0.5 seconds), 70 (3.5 seconds), and 20 (1 second).


 * Result


 * Fails if the arguments are not specified correctly, or if player fails to evaluate to one or more online players.


 * On success:
 * — Clears the screen title from the screens of the specified player(s). If no screen title is currently being displayed, has no effect.
 * — Resets the subtitle text to blank text, and the fade-in, stay and fade-out times to their default values for the specified player(s).
 * — If a screen title is currently being displayed to the specified player(s), changes the current subtitle to title; otherwise, specifies the subtitle for the next screen title to be displayed to the specified player(s).
 * — Changes the fade-in, stay, and fade-out times of all current and future screen titles for the specified player(s).
 * — Displays a screen title to the specified player(s), or changes the current screen title to title. After fading out, resets the subtitle back to blank text, but does not reset fade-in, stay, and fade-out times.
 * - Displays text on the action bar to the specified player(s), or changes the current action bar title.


 * Examples


 * To display a bold screen title "Chapter I" with a gray italic subtitle "The story begins…" to all players: