Function playground::extras::toggle_gamemode_on_sneak
source · pub(crate) fn toggle_gamemode_on_sneak(
clients: Query<'_, '_, &mut GameMode>,
events: EventReader<'_, '_, SneakEvent>,
)
Expand description
Toggles client’s game mode between survival and creative when they start sneaking.