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
    Before events

    BeforeJoinEvent

    Basalt's own (PowerNukkitX's PlayerLoginEvent): a login, verified, before the resource packs.

    Interface in @minecraft/server

    Extends CancellableEvent

    Basalt’s own (PowerNukkitX’s PlayerLoginEvent): a login, verified, before the resource packs.

    import type { BeforeJoinEvent } from '@minecraft/server';

    Subscribe to it with server.beforeEvents.beforeJoin.

    import { server, type BeforeJoinEvent } from '@minecraft/server';
    server.beforeEvents.beforeJoin.subscribe((event: BeforeJoinEvent) => {
    console.log('beforeJoin', event.name, event.xuid, event.address);
    // Uncomment to stop it from happening.
    // event.cancel = true;
    });
    import { server } from '@minecraft/server';
    server.beforeEvents.beforeJoin.subscribe((event) => {
    console.log('beforeJoin', event.name, event.xuid, event.address);
    // Uncomment to stop it from happening.
    // event.cancel = true;
    });

    read-only

    readonly name: string;

    read-only

    readonly xuid: string;

    read-only

    readonly address: string | undefined;

    The client’s IP address, if known.

    kickMessage: string;

    Shown to the player when cancelled; handlers may change it.

    ServerBeforeEvents.beforeJoin

    From CancellableEvent: cancel