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

    Class in @minecraft/server

    What’s on a player’s screen.

    import { ScreenDisplay } from '@minecraft/server';
    import { world, type ScreenDisplay } from '@minecraft/server';
    for (const player of world.getAllPlayers()) {
    const screenDisplay: ScreenDisplay = player.onScreenDisplay;
    console.log(player.name, screenDisplay.isValid);
    }
    import { world } from '@minecraft/server';
    for (const player of world.getAllPlayers()) {
    const screenDisplay = player.onScreenDisplay;
    console.log(player.name, screenDisplay.isValid);
    }

    read-only

    readonly isValid: boolean;
    setTitle(title: string | RawMessage | (string | RawMessage)[], options?: TitleDisplayOptions): void;
    Parameters
    title
    string | RawMessage | (string | RawMessage)[]
    optionsoptional
    TitleDisplayOptions
    updateSubtitle(subtitle: string | RawMessage | (string | RawMessage)[]): void;
    Parameters
    subtitle
    string | RawMessage | (string | RawMessage)[]
    setActionBar(text: string | RawMessage | (string | RawMessage)[]): void;
    Parameters
    text
    string | RawMessage | (string | RawMessage)[]
    clearTitle(): void;

    Takes the title off the screen.

    resetTitle(): void;

    Puts the title’s times and subtitle back to the client’s own.

    setHudVisibility(visible: HudVisibility, hudElements?: HudElement[]): void;

    Hides HUD elements, or shows them as usual again; every element if none are named.

    Parameters
    visible
    HudVisibility
    hudElementsoptional
    HudElement[]
    hideAllExcept(hudElements?: HudElement[]): void;

    Hides every HUD element but these.

    Parameters
    hudElementsoptional
    HudElement[]
    resetHudElementsVisibility(): void;

    Shows every HUD element as usual.

    isForcedHidden(hudElement: HudElement): boolean;

    Whether a plugin hid this element.

    Parameters
    hudElement
    HudElement
    Returns
    boolean

    Player.onScreenDisplay