Class PlayerSetHostEvent<RoomType>

Emitted when a player becomes the host of the room.

This event contains a setHost method that does not do anything in SkeldJS as the host of the room is decided by the server, making it impossible to alter the host as a client.

A server implementation may implement this by overriding the functions in Hostable responsible for updating the host.

Type Parameters

Hierarchy

  • BasicEvent
    • PlayerSetHostEvent

Implements

Properties

Accessors

Constructors

Methods

Properties

eventName: "player.sethost"
eventName: "player.sethost"
player: PlayerData<RoomType>

The player that this event is for.

room: RoomType

The room or client that the event came from.

Accessors

  • get alteredHost(): PlayerData<RoomType>
  • The altered player that will be made host instead, if changed.

    Returns PlayerData<RoomType>

Constructors

  • Type Parameters

    Parameters

    Returns PlayerSetHostEvent<RoomType>

Methods

  • Change the player that was made host.

    Parameters

    • player: PlayerData<RoomType>

      The player to make host.

    Returns void

Generated using TypeDoc