> For the complete documentation index, see [llms.txt](https://sayandev.gitbook.io/sayanvanish/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sayandev.gitbook.io/sayanvanish/features/bukkit/sneak-toggle-gamemode.md).

# Sneak Toggle GameMode

This feature allows vanished players to toggle their game mode by sneaking.

#### `FeatureSneakToggleGameMode`

| Parameter      | Description                                             | Default Value | Possible Values                                  |
| -------------- | ------------------------------------------------------- | ------------- | ------------------------------------------------ |
| `fallbackMode` | The game mode to switch to if no previous mode is found | `SURVIVAL`    | `SURVIVAL`, `CREATIVE`, `ADVENTURE`, `SPECTATOR` |

**Behavior:**

* When a vanished player sneaks, their game mode toggles between their current mode and spectator mode.
* The player's original game mode is restored when they stop sneaking.
* The feature ensures that the player's flight status is preserved during the toggle.
