Commands/title

From Minecraft Wiki
Jump to: navigation, search
title
Restrictions

Operator

First introduced

Java Edition 1.8 (14w20a)
PE 1.0.5 (Pocket Edition alpha 1.0.5.0)

Controls text displayed on the screen.

Usage[edit]

A screen title is displayed to players as a single line of large center-aligned text in the middle of their displays, and can include a subtitle; a second, separate line of text displayed just below the title. Text can also be printed to the action bar, the space just above the player's hotbar. All of them are specified using raw JSON text components.[note 1] 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 that are too big to fit on the screen are not line-wrapped (they just overflow off the screen on both sides).

Syntax[edit]

  • Java Edition
title <targets> (clear|reset)
title <targets> (title|subtitle|actionbar) <title>
title <targets> times <fadeIn> <stay> <fadeOut>
  • Bedrock Edition (plain text)
title <player: target> <clear|reset>
title <player: target> <title|subtitle|actionbar> <titleText: message>
title <player: target> times <fadeIn: int> <stay: int> <fadeOut: int>
  • Bedrock Edition (JSON)
titleraw <player: target> <clear|reset>
titleraw <player: target> <titleLocation: TileRawSet> <raw json titleText: json>
titleraw <player: target> times <fadeIn: int> <stay: int> <fadeOut: int>

Arguments[edit]

<targets> (BE: player: target)

Specifies the player(s) to display a screen title to. Must be a player name or target selector.
Entities other than players are not allowed.

<title> (BE: titleText: message or raw json titleText: json)

Specifies the text to display as a title, subtitle, or on the action bar. In Java Edition, must be a valid raw JSON text. In Bedrock Edition, must be a plain text for titleText: message and must be a valid raw JSON text for raw json titleText: json.

<fadeIn>, <stay> and <fadeOut> (BE: fadeIn: int, stay: int, and fadeOut: int)

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 0 and 2,147,483,647 in Java Edition, or between -2,147,483,648 and 2,147,483,647 in Bedrock Edition (inclusive, without the commas), but values below 0 are treated as 0. If not specified (or if reset), defaults to 10 (0.5 seconds), 70 (3.5 seconds), and 20 (1 second).

Result[edit]

Example result of the title command.

Fails if the arguments are not specified correctly, or if <targets> fails to evaluate to one or more online players.

On success:

  • clear — Clears the screen title from the screens of the specified player(s). If no screen title is currently being displayed, has no effect.
  • reset — 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).
  • subtitle — 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).
  • times — Changes the fade-in, stay, and fade-out times of all current and future screen titles for the specified player(s).
  • title — 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.
  • actionbar - Displays text on the action bar to the specified player(s), or changes the current action bar title.

Examples[edit]

All of the following displays a bold screen title "Chapter I" with a gray italic subtitle "The story begins…" to all players.

  • In Java Edition:
    1. /title @a subtitle {"text":"The story begins...","color":"gray","italic":true}
    2. /title @a title {"text":"Chapter I","bold":true}
  • In Bedrock Edition using plain text:
    1. /title @a subtitle §7§oThe story begins...
    2. /title @a title §lChapter I
  • In Bedrock Edition with raw text variants:
    1. /titleraw @a subtitle {"rawtext": [{"text":"§7§oThe story begins..."}]}
    2. /titleraw @a title {"rawtext": [{"translate":"§lChapter %%s","with":["I"]}]}

History[edit]

Java Edition
1.814w20aAdded /title.
1.1116w32bAdded the ability for /title to display text in the action bar position.
Pocket Edition
1.0.5alpha 1.0.5.0Added /title.

Notes[edit]

  1. In Bedrock Edition, the /title command uses plain text while /titleraw uses raw JSON text components.