Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Commands/title: Difference between revisions

From SAS Gaming Wiki
SyncBot (talk | contribs)
Sync: updated from Minecraft
SyncBot (talk | contribs)
Sync: updated from Minecraft
 
Line 6: Line 6:
* 1 {{only|bedrock|short=1}}
* 1 {{only|bedrock|short=1}}
|others=[[Minecraft:Cheat]] only{{only|bedrock|short=1}}
|others=[[Minecraft:Cheat]] only{{only|bedrock|short=1}}
}}{{Infobox command
| name = titleraw
| oplevel = * 1
| others = [[Minecraft:Cheat]] only
}}
}}


Line 11: Line 15:


== Usage ==
== Usage ==
[[File:Title command.png|thumb|Example result of the title command.]]
[[File:Title command.png|thumb|Example result of the title command]]
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 [[Minecraft:action bar]], the space just above the player's [[Minecraft:hotbar]].  
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 [[Minecraft:action bar]], the space just above the player's [[Minecraft:hotbar]].  


{{IN|java}}, all of them are specified using [[Minecraft:Raw JSON text format|text components]]. {{IN|bedrock}}, the <code>/title</code> command uses plain text while <code>/titleraw</code> uses raw JSON text components.
{{IN|java}}, all of them are specified using [[Minecraft:Raw JSON text format|text components]]. {{IN|bedrock}}, the <code>/title</code> command uses plain text (which can still be [[Minecraft:Formatting codes|formatted]]) while <code>/titleraw</code> uses raw JSON text components.


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). Note that the "fadeIn", "stay", and "fadeOut" values of each player are only sent to their own client side rather than stored in the server side. For a client, these values are cross-save and cross-server. These values are reset only when the client restarts, and the default is 10 game ticks (0.5 seconds), 70 game ticks (3.5 seconds), and 20 game ticks (1 second).
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). Note that the "fadeIn", "stay", and "fadeOut" values of each player are only sent to their own client side rather than stored in the server side. For a client, these values are cross-save and cross-server. These values are reset only when the client restarts, and the default is 10 game ticks (0.5 seconds), 70 game ticks (3.5 seconds), and 20 game ticks (1 second).


{{IN|be}}, the opacity of the black background of the title can be adjusted with the "Text Background Opacity" option in the [[Minecraft:Options#Accessibility|accessibility settings]].
{{IN|be}}, the opacity of the black background of the title can be adjusted with the "Background opacity (text & tooltips)" option in the [[Minecraft:Settings#Accessibility|accessibility settings]]. The opacity of the action bar is affected by the "Action bar opacity" setting.<gallery>
File:Title message.png|A title together with a subtitle in ''Bedrock Edition''
File:Styled title message.png|A styled title message with [[Minecraft:emojis]]
File:Action bar message.png|An action bar message
File:Styled action bar message.png|A styled action bar message
</gallery>


==Syntax==
==Syntax==


*'''Java Edition'''
*'''''Java Edition'''''
: <code>title <targets> (clear|reset)</code>
: <code>title <targets> (clear|reset)</code>
: <code>title <targets> (title|subtitle|actionbar) <title></code>
: <code>title <targets> (title|subtitle|actionbar) <title></code>
: <code>title <targets> times <fadeIn> <stay> <fadeOut></code>
: <code>title <targets> times <fadeIn> <stay> <fadeOut></code>


*'''Bedrock Edition (plain text)'''
*'''''Bedrock Edition'' (plain text)'''
: <code>title <player: target> <clear|reset></code>
: <code>title <player: target> <clear|reset></code>
: <code>title <player: target> <title|subtitle|actionbar> <titleText: message></code>
: <code>title <player: target> <title|subtitle|actionbar> <titleText: message></code>
: <code>title <player: target> times <fadeIn: int> <stay: int> <fadeOut: int></code>
: <code>title <player: target> times <fadeIn: int> <stay: int> <fadeOut: int></code>
*'''Bedrock Edition (JSON)'''
*'''''Bedrock Edition'' (JSON)'''
: <code>titleraw <player: target> <clear|reset></code>
: <code>titleraw <player: target> <clear|reset></code>
: <code>titleraw <player: target> <titleLocation: TileRawSet> <raw json titleText: json></code>
: <code>titleraw <player: target> <titleLocation: TileRawSet> <raw json titleText: json></code>
Line 102: Line 111:


== History ==
== History ==
{{missing info|/titleraw's history}}
{{missing info|/titleraw's history|section=1}}


=== ''Java Edition'' ===
=== ''Java Edition'' ===

Latest revision as of 11:24, 30 October 2026

Template:Redirect Template:Infobox commandTemplate:Infobox command

Controls text displayed on the screen.

Usage

File:Title command.png
Example result of the title command

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 Minecraft:action bar, the space just above the player's Minecraft:hotbar.

Template:IN, all of them are specified using text components. Template:IN, the /title command uses plain text (which can still be formatted) while /titleraw uses raw JSON text components.

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). Note that the "fadeIn", "stay", and "fadeOut" values of each player are only sent to their own client side rather than stored in the server side. For a client, these values are cross-save and cross-server. These values are reset only when the client restarts, and the default is 10 game ticks (0.5 seconds), 70 game ticks (3.5 seconds), and 20 game ticks (1 second).

Template:IN, the opacity of the black background of the title can be adjusted with the "Background opacity (text & tooltips)" option in the accessibility settings. The opacity of the action bar is affected by the "Action bar opacity" setting.

Syntax

  • 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>

Detail

... clear
Clears the screen title from the screens of the specified player(s).
... reset
Resets the subtitle text for the specified player(s) to blank text, and the fade-in, stay and fade-out times to their default values (defaults to 10 gt, 70 gt, and 20 gt).
... subtitle ...
If a screen title is currently being displayed to the specified player(s), changes the current subtitle to the specified text; otherwise, specifies the subtitle for the next screen title to be displayed to the specified player(s).
... title ...
Displays a screen title to the specified player(s), or changes the current screen title to the specified text. 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.
... times ...
Changes the fade-in, stay, and fade-out times (measured in time durations) of all current and future screen titles for the specified player(s).

Arguments

Template:Argument

Specifies the player(s) to display a screen title to.
Template:Arg desc

Template:El: Template:Argument
Template:El: Template:Argument or Template:Argument

Specifies the text to display as a title, subtitle, or on the action bar.
Template:IN, Template:Arg desc
Template:IN,

Template:El: Template:Argument, Template:Argument and Template:Argument
Template:El: Template:Argument, Template:Argument, and Template:Argument

Specifies the time for the screen title to fade in, stay, and fade out. Template:IN, it's specified in game ticks (1/20ths of a second), and values below 0 are treated as 0.
Template:Arg desc

Result

Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table

Output

Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table

Examples

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

  • Template:IN:
    1. /title @a subtitle {"text": "The story begins...", "color": "gray", "italic": true}
    2. /title @a title {"text": "Chapter I", "bold": true}
  • Template:IN using plain text:
    1. /title @a subtitle §7§oThe story begins...
    2. /title @a title §lChapter I
  • Template:IN 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

Template:Missing info

Java Edition

Template:HistoryTable

Bedrock Edition

Template:HistoryTable

External links

Navigation

Template:Navbox commands

Minecraft:de:Befehl/title Minecraft:fr:Commandes/title Minecraft:ja:コマンド/title Minecraft:pt:Comandos/title Minecraft:ru:Команды консоли/title Minecraft:zh:命令/title