This page describes an education-related feature.
This feature is available only in Minecraft Education or when enabling the "Education" option in Bedrock Edition.
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
true
orfalse
. 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
isn't specified, returns whether the player has the specified ability. If ability: Ability
isn't specified, returns what abilities the player has.
History[]
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. | |||
Education Edition | |||||
1.7 | Added /ability . |