Commands/ability
Minecraft Wiki article. Categories: Bedrock_Edition, Bedrock_Edition_specific_information, Minecraft_Education_specific_information, Minecraft_Education, Commands
This article is reproduced from Commands/ability on the Minecraft Wiki. Mirrored from revision 3723897. It is licensed CC BY-NC-SA 3.0 by the Minecraft Wiki contributors — not under the Codex’s CC BY-SA 4.0, and it may not be used commercially. Edits belong upstream, not here.
/ability{
"title": "<code>/ability</code>",
"rows": [
{
"field": "1",
"label": "(link to Permission level article, displayed as Permission level<br>required)"
},
{
"field": "(link to Cheat article, displayed as Cheat) only<br>",
"label": "(link to Commands#Restrictions article, displayed as Restrictions)"
}
],
"invimages": [],
"images": []
}
Sets or queries a player with a specific ability.
Syntax
ability <player: target> <ability: Ability> [value: Boolean]ability <player: target> [ability: Ability]
Arguments
player: target: CommandSelector<Player>
- Specifies the target for which to grant/revoke/query the ability.
ability: Ability: enum
- Specifies the player ability.
- These abilities are:
value: Boolean: enum
- 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
| Pocket Edition Alpha | |||||||
|---|---|---|---|---|---|---|---|
| v0.16.0 | build 1 | Added /ability. | |||||
| Bedrock Edition | |||||||
| 1.5.0 | beta 1.5.0.4 | Added the function of query. | |||||
Minecraft Education
| Minecraft Education | |||||||
|---|---|---|---|---|---|---|---|
| 1.7 | Added /ability. | ||||||
Navigation
Sources
- Commands/ability — Minecraft Wiki, CC BY-NC-SA 3.0, revision 3723897.