Player
paper/player_fly
Player Flight
Gets or sets the flight state of a player.
Note: Setting flying to true on a player who does not have allowFlight will automatically grant it first. Players in survival/adventure mode cannot normally fly.
Inputs
| Name | Type | Optional | Description |
|---|---|---|---|
exec |
exec | Incoming execution. | |
player |
player | The player. | |
allowFlight |
boolean | ✓ | Enable or disable the ability to fly (SET only). |
flying |
boolean | ✓ | Set whether the player is currently flying (SET only). |
Outputs
| Name | Type | Description |
|---|---|---|
exec |
exec | Continues after the operation. |
allowFlight |
boolean | Whether the player is allowed to fly. |
isFlying |
boolean | Whether the player is currently flying. |
Properties
| Key | Type | Default | Description |
|---|---|---|---|
op |
string | "GET" |
GET or SET. |
Examples
Toggle flight on command
Allow a player to toggle their flight mode with a command.
- Command Trigger → exec → Player Flight (GET)
- Player Flight → isFlying → Logic Op (NOT) → Player Flight (SET, flying input)