Minecraft:Commands/ability: Difference between revisions
From SAS Gaming Wiki
More actions
Fix template calls: add MC/ prefix |
Sync: updated from Minecraft |
||
| Line 1: | Line 1: | ||
{{ | {{education feature}} | ||
{{Infobox command | {{Infobox command | ||
|name=ability | |name=ability | ||
| Line 13: | Line 13: | ||
== Arguments == | == Arguments == | ||
{{ | {{argument|be=1|player: target|CommandSelector<Player>}} | ||
: Specifies the target for which to grant/revoke/query the ability. | : Specifies the target for which to grant/revoke/query the ability. | ||
{{ | {{argument|be=1|ability: Ability|enum}} | ||
: Specifies the player ability. | : Specifies the player ability. | ||
: These abilities are: | : These abilities are: | ||
:* <code>worldbuilder</code> gives the selector the ability to become a world builder. This allows the player to build - even in ''Adventure Mode''. | :* <code>worldbuilder</code> gives the selector the ability to become a world builder. This allows the player to build - even in ''[[Minecraft:Adventure mode|Adventure Mode]]''. | ||
:* <code>mayfly</code> lets the selector fly as if they were in Creative Mode. | :* <code>mayfly</code> lets the selector [[Minecraft:Flying|fly]] as if they were in [[Minecraft:Creative Mode]]. | ||
:* <code>mute</code> mutes the selector. If they chat, no one can hear (or see) their message. | :* <code>mute</code> mutes the selector. If they [[Minecraft:chat]], no one can hear (or see) their message. | ||
{{ | {{argument|be=1|value: Boolean|enum}} | ||
: Specifies the value to set the ability to, must be either <code>true</code> or <code>false</code>. If not specified, returns the current ability's value. | : Specifies the value to set the ability to, must be either <code>true</code> or <code>false</code>. If not specified, returns the current ability's value. | ||
| Line 29: | Line 29: | ||
Fails if the arguments are not specified correctly. | Fails if the arguments are not specified correctly. | ||
On success, sets the player ability into the specified ability. If <code>value: Boolean</code> | On success, sets the player ability into the specified ability. If <code>value: Boolean</code> is not specified, returns whether the player has the specified ability. If <code>ability: Ability</code> is not specified, returns what abilities the player has. | ||
== History == | == History == | ||
=== ''Bedrock Edition'' === | === ''Bedrock Edition'' === | ||
{{HistoryTable | {{HistoryTable | ||
|{{ | |{{HistoryLine|pocket alpha}} | ||
|{{HistoryLine||v0.16.0|dev=build 1|Added {{ | |{{HistoryLine||v0.16.0|dev=build 1|Added {{cd|/ability}}.}} | ||
|{{ | |{{HistoryLine|bedrock}} | ||
|{{ | |{{HistoryLine||1.5.0|dev=beta 1.5.0.4|Added the function of query.}} | ||
}} | }} | ||
=== ''Minecraft Education'' === | === ''Minecraft Education'' === | ||
{{HistoryTable | {{HistoryTable | ||
|{{ | |{{HistoryLine|education}} | ||
|{{HistoryLine||1.7|Added {{ | |{{HistoryLine||1.7|Added {{cd|/ability}}.}} | ||
}} | }} | ||
== Navigation == | == Navigation == | ||
{{ | {{Navbox commands}} | ||
es:Comandos/ability | [[Minecraft:es:Comandos/ability]] | ||
fr:Commandes | [[Minecraft:fr:Commandes#ability]] | ||
ja:コマンド/ability | [[Minecraft:ja:コマンド/ability]] | ||
lzh:令/ability | [[Minecraft:lzh:令/ability]] | ||
pt:Comandos/ability | [[Minecraft:pt:Comandos/ability]] | ||
ru:Команды консоли/ability | [[Minecraft:ru:Команды консоли/ability]] | ||
zh:命令/ability | [[Minecraft:zh:命令/ability]] | ||
de:Befehl/ability | [[Minecraft:de:Befehl/ability]] | ||
Latest revision as of 11:06, 24 May 2026
Template:Education feature Template:Infobox command
Sets or queries a player with a specific ability.
Syntax
ability <player: target> <ability: Ability> [value: Boolean]ability <player: target> [ability: Ability]
Arguments
- Specifies the target for which to grant/revoke/query the ability.
- Specifies the player ability.
- These abilities are:
worldbuildergives the selector the ability to become a world builder. This allows the player to build - even in Adventure Mode.mayflylets the selector fly as if they were in Minecraft:Creative Mode.mutemutes the selector. If they Minecraft:chat, no one can hear (or see) their message.
- Specifies the value to set the ability to, must be either
trueorfalse. If not specified, returns the current ability's value.
Result
Fails if the arguments are not specified correctly.
On success, sets the player ability into the specified ability. If value: Boolean is not specified, returns whether the player has the specified ability. If ability: Ability is not specified, returns what abilities the player has.
History
Bedrock Edition
Minecraft Education
Minecraft:es:Comandos/ability Minecraft:fr:Commandes#ability Minecraft:ja:コマンド/ability Minecraft:lzh:令/ability Minecraft:pt:Comandos/ability Minecraft:ru:Команды консоли/ability Minecraft:zh:命令/ability Minecraft:de:Befehl/ability