Skip to content
BasaltSoftware
Bedrock 1.26.60

Site colour

Discord
Esc

    ↑↓ moveEnter openEsc close

    Keyboard shortcuts
    Ctrl K
    Search the whole site, from any page
    /
    Jump to the sidebar search, or search the whole site where there isn't one
    Enter
    Open the top search result
    Esc
    Clear the search, or close this panel
    ?
    Show these shortcuts
    Players

    PlayerInputInfo

    Class in @minecraft/server

    What the player’s latest input said of their controls.

    import { PlayerInputInfo } from '@minecraft/server';
    import { world, type PlayerInputInfo } from '@minecraft/server';
    for (const player of world.getAllPlayers()) {
    const playerInputInfo: PlayerInputInfo = player.inputInfo;
    console.log(player.name, playerInputInfo.lastInputModeUsed);
    }
    import { world } from '@minecraft/server';
    for (const player of world.getAllPlayers()) {
    const playerInputInfo = player.inputInfo;
    console.log(player.name, playerInputInfo.lastInputModeUsed);
    }

    read-only

    readonly lastInputModeUsed: InputMode;

    Taken from each input the client sends.

    read-only

    readonly touchOnlyAffectsHotbar: boolean;

    Always false in Basalt.

    getButtonState(button: InputButton): ButtonState;
    Parameters
    button
    InputButton
    Returns
    ButtonState
    getMovementVector(): Vector2;

    Sideways (x) and forwards (y), each from -1 to 1.

    Returns
    Vector2
    Types

    Player.inputInfo