Minecraft:Commands/hud: Difference between revisions
More actions
→Arguments: Missing added code |
Fix template calls: add MC/ prefix |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{about|the command|the system showing the player's conditions|Heads-up display}} | {{about|the command|the system showing the player's conditions|Heads-up display}} | ||
{{ | {{MC/Exclusive|bedrock|education}} | ||
{{Infobox command | {{Infobox command | ||
|name=hud | |name=hud | ||
| Line 6: | Line 6: | ||
|cheat=1 | |cheat=1 | ||
}} | }} | ||
Changes the visibility of a | Changes the visibility of a HUD element. | ||
== Syntax == | == Syntax == | ||
| Line 12: | Line 12: | ||
== Arguments == | == Arguments == | ||
{{ | {{MC/Argument|be=1|target: target|CommandSelector<Player>}} | ||
:Specifies the target(s) to change the HUD element(s) visibility for. | :Specifies the target(s) to change the HUD element(s) visibility for. | ||
:{{ | :{{MC/Arg desc|be=player}} | ||
{{ | {{MC/Argument|be=1|visible: HudVisibility|enum}} | ||
:Whether <code>hide</code> or <code>reset</code> the HUD element(s) visibility. | :Whether <code>hide</code> or <code>reset</code> the HUD element(s) visibility. | ||
:Must be either <code>hide</code> or <code>reset</code>. | :Must be either <code>hide</code> or <code>reset</code>. | ||
{{ | {{MC/Argument|be=1|hud_element: HudElement|enum}} | ||
:The HUD element(s). | :The HUD element(s). | ||
:Must be one of <code>air_bubbles</code>, <code>all</code>, <code>armor</code>, <code>crosshair</code>, <code>health</code>, <code>horse_health</code>, <code>hotbar</code>, <code>hunger</code>, | :Must be one of <code>air_bubbles</code>, <code>all</code>, <code>armor</code>, <code>crosshair</code>, <code>health</code>, <code>horse_health</code>, <code>hotbar</code>, <code>hunger</code>, | ||
| Line 33: | Line 33: | ||
== Output == | == Output == | ||
{{Output table|onlybe=1}} | {{MC/Output table|onlybe=1}} | ||
{{Output table|edition=be|On fail|0}} | {{MC/Output table|edition=be|On fail|0}} | ||
{{Output table|On success|1}} | {{MC/Output table|On success|1}} | ||
{{Output table}} | {{MC/Output table}} | ||
== Examples == | == Examples == | ||
*To hide all | *To hide all HUD elements for all players: | ||
**<code>/hud @a hide all</code> | **<code>/hud @a hide all</code> | ||
*To make the | *To make the health bar visible again for the nearest player in Survival mode: | ||
**<code>/hud @p[m=s] reset health</code> | **<code>/hud @p[m=s] reset health</code> | ||
== History == | == History == | ||
{{HistoryTable | {{HistoryTable | ||
|{{HistoryLine|bedrock}} | |{{MC/HistoryLine|bedrock}} | ||
|{{HistoryLine||1.20.60|exp=Upcoming Creator Features|dev=Preview 1.20.60.23|Added {{ | |{{HistoryLine||1.20.60|exp=Upcoming Creator Features|dev=Preview 1.20.60.23|Added {{MC/Cmd|hud|link=none}} behind the "Upcoming Creator Features" experimental toggle.}} | ||
|{{HistoryLine||1.20.80|dev=Preview 1.20.80.23|Moved the <code>/hud</code> command out of "Upcoming Creator Features" experimental toggle.}} | |{{MC/HistoryLine||1.20.80|dev=Preview 1.20.80.23|Moved the <code>/hud</code> command out of "Upcoming Creator Features" experimental toggle.}} | ||
}} | }} | ||
| Line 56: | Line 56: | ||
== Navigation == | == Navigation == | ||
{{Navbox commands}} | {{MC/Navbox commands}} | ||
de:Befehl/hud | |||
ja:コマンド/hud | |||
pt:Comandos/hud | |||
zh:命令/hud | |||
Latest revision as of 20:11, 9 April 2026
|
For the {{{Description}}} of the same name, see [[{{{Destination}}}]]. |
Script error: No such module "Exclusive". Template:Infobox command Changes the visibility of a HUD element.
Syntax
hud <target: target> <visible: HudVisibility> [hud_element: HudElement]
Arguments
target: target: CommandSelector<Player>
- Specifies the target(s) to change the HUD element(s) visibility for.
- {{#vardefine:onlyje|Template:IN,}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|inapplicability}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
visible: HudVisibility: enum
- Whether
hideorresetthe HUD element(s) visibility. - Must be either
hideorreset.
hud_element: HudElement: enum
- The HUD element(s).
- Must be one of
air_bubbles,all,armor,crosshair,health,horse_health,hotbar,hunger,
item_text, paperdoll, progress_bar, status_effects,tooltips, and touch_controls.
Result
Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table
Output
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-table-lines|-2}}{{#vardefine:output-table-lines-now|}}{{#vardefine:command-num-now|}}{{#vardefine:command-line-now|}}{{#vardefine:commands-num|}}{{#vardefine:output-edition-num-now|}}{{#vardefine:output-edition-line-now|}}{{#vardefine:output-editions-num|}}{{#vardefine:je-outputs-dis|}}
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On fail}}{{#vardefine:output1-{{#var:output-table-lines}}|0}}{{#vardefine:output2-{{#var:output-table-lines}}|N/A}}{{#vardefine:output3-{{#var:output-table-lines}}|N/A}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-editions-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-{{#var:output-editions-num}}|be}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|1}} {{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On success}}{{#vardefine:output1-{{#var:output-table-lines}}|1}}{{#vardefine:output2-{{#var:output-table-lines}}|N/A}}{{#vardefine:output3-{{#var:output-table-lines}}|N/A}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|Expression error: Unrecognized punctuation character "{".}}
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-table-lines|-2}}{{#vardefine:output-table-lines-now|}}{{#vardefine:command-num-now|}}{{#vardefine:command-line-now|}}{{#vardefine:commands-num|}}{{#vardefine:output-edition-num-now|}}{{#vardefine:output-edition-line-now|}}{{#vardefine:output-editions-num|}}{{#vardefine:je-outputs-dis|}}
Examples
- To hide all HUD elements for all players:
/hud @a hide all
- To make the health bar visible again for the nearest player in Survival mode:
/hud @p[m=s] reset health
History
External links
de:Befehl/hud ja:コマンド/hud pt:Comandos/hud zh:命令/hud