Skip to content

@minecraft/server


@minecraft/server / InputButton

Enumeration: InputButton ​

Defined in: @minecraft/server/index.d.ts:2029

All the different input buttons that are supported. Use with InputInfo.getButtonState via Player.inputInfo or PlayerButtonInputAfterEvent via WorldAfterEvents.playerButtonInput

Enumeration Members ​

Jump ​

Jump: "Jump"

Defined in: @minecraft/server/index.d.ts:2036

Remarks ​

This is mapped to the 'Jump' button on controllers, keyboards, and touch interfaces.


Sneak ​

Sneak: "Sneak"

Defined in: @minecraft/server/index.d.ts:2048

Remarks ​

This is mapped to the 'Sneak' button on controllers, keyboards, and touch interfaces. By default, this is shift on a keyboard or B on an Xbox controller. On touch interfaces this will only be pressed for 1 tick or less and then it will be released immediately even if the player holds their finger down. Dismounting a horse or exiting a boat will not send a Sneak button change event.