Minecraft:Commands/hud: Difference between revisions
From SAS Gaming Wiki
More actions
Fix template calls: add MC/ prefix |
Sync: updated from Minecraft |
||
| Line 1: | Line 1: | ||
{{ | {{exclusive|bedrock|education}} | ||
{{Infobox command | {{Infobox command | ||
|name=hud | |name=hud | ||
| Line 6: | Line 5: | ||
|cheat=1 | |cheat=1 | ||
}} | }} | ||
Changes the visibility of a HUD element. | Changes the visibility of a [[Minecraft:HUD]] element. | ||
== Syntax == | == Syntax == | ||
| Line 12: | Line 11: | ||
== Arguments == | == Arguments == | ||
{{ | {{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. | ||
:{{ | :{{arg desc|be=player}} | ||
{{ | {{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>. | ||
{{ | {{argument|be=1|hud_element: HudElement|enum}} | ||
:The HUD element | :The HUD element: | ||
: | :* <code>air_bubbles</code>: The player's oxygen points. | ||
<code>item_text</code>, <code>paperdoll</code> | :* <code>armor</code>: The player's [[Minecraft:armor]] points. | ||
:* <code>crosshair</code>: The [[Minecraft:crosshair]]. | |||
:* <code>health</code>: The player's [[Minecraft:health]] points. | |||
:* <code>horse_health</code>: Health points of a mount. | |||
:* <code>hotbar</code>: The [[Minecraft:hotbar]]. | |||
:* <code>hunger</code>: [[Minecraft:Hunger]] points. | |||
:* <code>item_text</code>: Held item tooltips above the hotbar, including music disc messages. | |||
:* <code>paperdoll</code>: The player's paper doll in the top-left. Can also be toggled in the [[Minecraft:settings]] and with {{Keys|F8}}. | |||
:* <code>progress_bar</code>: The [[Minecraft:experience]] bar, as well has custom bars for mounts. | |||
:* <code>status_effects</code>: Icons for [[Minecraft:status effects]]. | |||
:* <code>tooltips</code>: Controller hints. Can also be toggled in the settings and with {{Keys|F10}}. | |||
:* <code>touch_controls</code>: All elements pertaining to the [[Minecraft:touch]] controller, including the inventory button on the hotbar but excluding the top buttons (perspective, emotes, chat, menu). | |||
:* <code>all</code>: All of the above. HUD elements ''not'' mentioned above are still shown, including the [[Minecraft:chat]], [[Minecraft:closed captions]], [[Minecraft:toasts]], [[Minecraft:screen effects]], [[Minecraft:Locator Bar|locator bar]], [[Minecraft:bossbar]], coordinates and days played, [[Minecraft:scoreboard]], demo counter, and player hand. | |||
== Result == | == Result == | ||
{{Result table|onlybe=1}} | {{Result table|onlybe=1}} | ||
| Line 33: | Line 43: | ||
== Output == | == Output == | ||
{{ | {{Output table|onlybe=1}} | ||
{{ | {{Output table|edition=be|On fail|0}} | ||
{{ | {{Output table|On success|1}} | ||
{{ | {{Output table}} | ||
== Examples == | == Examples == | ||
*To hide all HUD elements for all players: | *To hide all [[Minecraft:HUD|HUD elements]] for all players: | ||
**<code>/hud @a hide all</code> | **<code>/hud @a hide all</code> | ||
*To make the health bar visible again for the nearest player in Survival mode: | *To make the [[Minecraft:health bar]] visible again for the nearest player in [[Minecraft:Survival]] mode: | ||
**<code>/hud @p[m=s] reset health</code> | **<code>/hud @p[m=s] reset health</code> | ||
== History == | == History == | ||
{{HistoryTable | {{HistoryTable | ||
|{{ | |{{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 {{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.}} | ||
}} | }} | ||
| Line 56: | Line 66: | ||
== Navigation == | == Navigation == | ||
{{ | {{Navbox commands}} | ||
de:Befehl/hud | [[Minecraft:de:Befehl/hud]] | ||
ja:コマンド/hud | [[Minecraft:ja:コマンド/hud]] | ||
pt:Comandos/hud | [[Minecraft:pt:Comandos/hud]] | ||
zh:命令/hud | [[Minecraft:zh:命令/hud]] | ||
Latest revision as of 11:24, 30 October 2026
Template:Exclusive Template:Infobox command Changes the visibility of a Minecraft:HUD element.
Syntax
hud <target: target> <visible: HudVisibility> [hud_element: HudElement]
Arguments
- Specifies the target(s) to change the HUD element(s) visibility for.
- Template:Arg desc
- Whether
hideorresetthe HUD element(s) visibility. - Must be either
hideorreset.
- The HUD element:
air_bubbles: The player's oxygen points.armor: The player's Minecraft:armor points.crosshair: The Minecraft:crosshair.health: The player's Minecraft:health points.horse_health: Health points of a mount.hotbar: The Minecraft:hotbar.hunger: Minecraft:Hunger points.item_text: Held item tooltips above the hotbar, including music disc messages.paperdoll: The player's paper doll in the top-left. Can also be toggled in the Minecraft:settings and with Template:Keys.progress_bar: The Minecraft:experience bar, as well has custom bars for mounts.status_effects: Icons for Minecraft:status effects.tooltips: Controller hints. Can also be toggled in the settings and with Template:Keys.touch_controls: All elements pertaining to the Minecraft:touch controller, including the inventory button on the hotbar but excluding the top buttons (perspective, emotes, chat, menu).all: All of the above. HUD elements not mentioned above are still shown, including the Minecraft:chat, Minecraft:closed captions, Minecraft:toasts, Minecraft:screen effects, locator bar, Minecraft:bossbar, coordinates and days played, Minecraft:scoreboard, demo counter, and player hand.
Result
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
Examples
- To hide all HUD elements for all players:
/hud @a hide all
- To make the Minecraft:health bar visible again for the nearest player in Minecraft:Survival mode:
/hud @p[m=s] reset health
History
External links
Minecraft:de:Befehl/hud Minecraft:ja:コマンド/hud Minecraft:pt:Comandos/hud Minecraft:zh:命令/hud