Options
All
  • Public
  • Public/Protected
  • All
Menu

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

  • RoomType: Hostable

Hierarchy

Implements

Index

Properties

Accessors

Constructors

Methods

Properties

Static eventName

eventName: "player.sethost" = ...

eventName

eventName: "player.sethost" = ...

Readonly player

player: PlayerData<RoomType>

The player that this event is for.

Readonly room

room: RoomType

The room or client that the event came from.

Accessors

alteredHost

  • get alteredHost(): PlayerData<RoomType>

Constructors

constructor

  • new PlayerSetHostEvent<RoomType>(room: RoomType, player: PlayerData<RoomType>): PlayerSetHostEvent<RoomType>

Methods

setHost

  • setHost(player: PlayerData<RoomType>): void

Generated using TypeDoc