import { CancelableEvent } from "@skeldjs/events"; import { Connection, Room } from "../../../worker"; /** * Emitted when the room selects the next host in the room. * * Can be used to change the default host selection, especially combined with the * {@link RoomSelectHostEvent.isActingHost} and {@link RoomSelectHostEvent.isJoining} flags. */ export declare class RoomSelectHostEvent extends CancelableEvent { readonly room: Room; /** * Whether or not this is for an acting host (in server-as-a-host). */ readonly isActingHost: boolean; /** * Whether or not this player is being selected because they just joined * and no one else is the host. */ readonly isJoining: boolean; /** * The host that is to be selected as host. */ readonly selected: Connection; static eventName: "room.selecthost"; eventName: "room.selecthost"; private _alteredSelected; constructor(room: Room, /** * Whether or not this is for an acting host (in server-as-a-host). */ isActingHost: boolean, /** * Whether or not this player is being selected because they just joined * and no one else is the host. */ isJoining: boolean, /** * The host that is to be selected as host. */ selected: Connection); /** * The new host to be selected instead of the one in {@link RoomSelectHostEvent.selected}. */ get alteredSelected(): Connection; /** * Change the host to be selected instead of {@link RoomSelectHostEvent.selected}. * @param host The host to be selected. */ selectHost(host: Connection): void; }