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.
Example
Section titled “Example”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;});Properties
Section titled “Properties”read-only
readonly name: string;read-only
readonly xuid: string;address
Section titled “address”read-only
readonly address: string | undefined;The client’s IP address, if known.
kickMessage
Section titled “kickMessage”kickMessage: string;Shown to the player when cancelled; handlers may change it.
Used by
Section titled “Used by”Inherited
Section titled “Inherited”From CancellableEvent: cancel