This page describes an education-related feature. 
This feature is available only in Education Edition or when enabling the "Education Edition" option in Bedrock Edition.
ability
Permission level
required

1

Restrictions

Cheat only

Sets or queries 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

Specifies the player ability.
These abilities are:
  • worldbuilder gives the selector the ability to become a world builder.
  • mayfly lets the selector fly.
  • mute mutes the selector. If they chat, no one can hear (or see) them.

value: Boolean: boolean

Specifies the value to set the ability to, must be either true or false. 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.0build 1Added /ability.
?Added the function of query.
Education Edition
?Added /ability.
Community content is available under CC BY-NC-SA 3.0 unless otherwise noted.