mooball
    Preparing search index...

    Interface CommonRoomConfigCallbacks

    interface CommonRoomConfigCallbacks {
        onAfterAutoTeams?(
            playerId1: number,
            teamId1: number,
            playerId2: number | null,
            teamId2: number | null,
            byId: number,
            customData?: any,
        ): void;
        onAfterGamePauseChange?(
            isPaused: boolean,
            byId: number,
            customData?: any,
        ): void;
        onAfterGameStart?(byId: number, customData?: any): void;
        onAfterGameStop?(byId: number, customData?: any): void;
        onAfterKickRateLimitChange?(
            min: number,
            rate: number,
            burst: number,
            byId: number,
            customData?: any,
        ): void;
        onAfterOvertimeLimitChange?(value: number, customData?: any): void;
        onAfterPlayerAdminChange?(
            id: number,
            isAdmin: boolean,
            byId: number,
            customData?: any,
        ): void;
        onAfterPlayerAvatarChange?(
            id: number,
            value: string,
            customData?: any,
        ): void;
        onAfterPlayerChat?(id: number, message: string, customData?: any): void;
        onAfterPlayerChatIndicatorChange?(
            id: number,
            value: boolean,
            customData?: any,
        ): void;
        onAfterPlayerDirectionChange?(
            id: number,
            value: number,
            customData?: any,
        ): void;
        onAfterPlayerDiscCreated?(playerObj: Player, customData?: any): void;
        onAfterPlayerDiscDestroyed?(playerObj: Player, customData?: any): void;
        onAfterPlayerInputChange?(
            id: number,
            value: number,
            customData?: any,
        ): void;
        onAfterPlayerJoin?(playerObj: Player, customData?: any): void;
        onAfterPlayerLeave?(
            playerObj: Player,
            reason: string | null,
            isBanned: boolean,
            byId: number,
            customData?: any,
        ): void;
        onAfterPlayerObjectCreated?(playerObj: Player, customData?: any): void;
        onAfterPlayerSyncChange?(
            playerId: number,
            value: boolean,
            customData?: any,
        ): void;
        onAfterPlayerTeamChange?(
            id: number,
            teamId: number,
            byId: number,
            customData?: any,
        ): void;
        onAfterScoreLimitChange?(
            value: number,
            byId: number,
            customData?: any,
        ): void;
        onAfterStadiumChange?(
            stadium: IStadium,
            byId: number,
            customData?: any,
        ): void;
        onAfterTeamColorsChange?(
            teamId: number,
            value: TeamColors,
            byId: number,
            customData?: any,
        ): void;
        onAfterTeamsLockChange?(
            value: boolean,
            byId: number,
            customData?: any,
        ): void;
        onAfterTimeLimitChange?(
            value: number,
            byId: number,
            customData?: any,
        ): void;
        onBeforeAutoTeams?(
            playerId1: number,
            teamId1: number,
            playerId2: number | null,
            teamId2: number | null,
            byId: number,
        ): any;
        onBeforeGamePauseChange?(isPaused: boolean, byId: number): any;
        onBeforeGameStart?(byId: number): any;
        onBeforeGameStop?(byId: number): any;
        onBeforeKickRateLimitChange?(
            min: number,
            rate: number,
            burst: number,
            byId: number,
        ): any;
        onBeforeOvertimeLimitChange?(value: number): any;
        onBeforePlayerAdminChange?(id: number, isAdmin: boolean, byId: number): any;
        onBeforePlayerAvatarChange?(id: number, value: string): any;
        onBeforePlayerChat?(id: number, message: string): any;
        onBeforePlayerChatIndicatorChange?(id: number, value: boolean): any;
        onBeforePlayerDirectionChange?(id: number, value: number): any;
        onBeforePlayerDiscCreated?(playerObj: Player): any;
        onBeforePlayerDiscDestroyed?(playerObj: Player): any;
        onBeforePlayerInputChange?(id: number, value: number): any;
        onBeforePlayerJoin?(playerObj: Player): any;
        onBeforePlayerLeave?(
            playerObj: Player,
            reason: string | null,
            isBanned: boolean,
            byId: number,
        ): any;
        onBeforePlayerObjectCreated?(playerObj: Player): any;
        onBeforePlayerSyncChange?(playerId: number, value: boolean): any;
        onBeforePlayerTeamChange?(id: number, teamId: number, byId: number): any;
        onBeforeScoreLimitChange?(value: number, byId: number): any;
        onBeforeStadiumChange?(stadium: IStadium, byId: number): any;
        onBeforeTeamColorsChange?(
            teamId: number,
            value: TeamColors,
            byId: number,
        ): any;
        onBeforeTeamsLockChange?(value: boolean, byId: number): any;
        onBeforeTimeLimitChange?(value: number, byId: number): any;
    }

    Hierarchy (View Summary)

    Index

    Methods

    • Called just after an "auto" event has been triggered to automatically move at least one, at most two players from spectators to teams.

      Parameters

      • playerId1: number

        Id of the first player affected by this event.

      • teamId1: number

        Id of the team which the first player was moved into.

      • playerId2: number | null

        Id of the second player affected by this event, or null if there was only one spectator when this event was triggered.

      • teamId2: number | null

        Id of the team which the second player was moved into, or null if there was only one spectator when this event was triggered.

      • byId: number

        Id of the player who has triggered the event.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns void

      void.

    • Called just after the game has been paused or resumed.

      Parameters

      • isPaused: boolean

        Whether the game has been paused or not.

      • byId: number

        Id of the player who has triggered this event.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns void

      void.

    • Called just after the game has been started.

      Parameters

      • byId: number

        Id of the player who has started the game.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns void

      void.

    • Called just after the game has been stopped.

      Parameters

      • byId: number

        Id of the player who has stopped the game.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns void

      void.

    • Called just after the room's kick rate limit has been changed.

      Parameters

      • min: number

        The new min part of kick rate limit.

      • rate: number

        The new rate part of kick rate limit.

      • burst: number

        The new burst part of kick rate limit.

      • byId: number

        Id of the player who has changed the kick rate limit.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns void

      void.

    • Called just after room's overtime limit has been changed.

      Parameters

      • value: number

        The desired overtime limit of the game.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns void

      void.

    • Called just after a player's admin rights have been given/taken.

      Parameters

      • id: number

        Id of the player whose admin rights have been given/taken.

      • isAdmin: boolean

        The new admin rights status of the player whose id is id.

      • byId: number

        Id of the player who has triggered this event.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns void

      void.

    • Called just after a player has changed his/her avatar.

      Parameters

      • id: number

        Id of the player who has changed his/her avatar.

      • value: string

        The new avatar value.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns void

      void.

    • Called just after a chat message has been received.

      Parameters

      • id: number

        Id of the player who has sent the chat message.

      • message: string

        The chat message.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns void

      void.

    • Called just after a player has activated or deactivated his/her chat indicator. This happens when a player focuses/loses focus on the chat input component in the website.

      Parameters

      • id: number

        Id of the player whose chat indicator has been activated/deactivated.

      • value: boolean

        Whether the chat indicator has been activated or not.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns void

      void.

    • Called just after the direction of an individual player was changed. room.state.directionActive must be true for this to work.

      Parameters

      • id: number

        Id of the player whose energy values will be modified.

      • value: number

        New direction value of the player.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns void

      void.

    • Called just after a disc object has been assigned to a player object.

      Parameters

      • playerObj: Player

        The new Player object that has just been assigned a disc object.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns void

      void.

    • Called just after a disc object has been removed from a player object.

      Parameters

      • playerObj: Player

        The Player object whose disc object has just been removed.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns void

      void.

    • Called just after a player's input has been changed.

      Parameters

      • id: number

        Id of the player whose input has been changed.

      • value: number

        The new input value of the player.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns void

      void.

    • Called just after a player has joined the room.

      Parameters

      • playerObj: Player

        The data representation of the player that has just joined the room.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns void

      void.

    • Called just after a player has left the room.

      Parameters

      • playerObj: Player

        The player who has left the room.

      • reason: string | null

        The reason of leaving the room. If null, the player has left by himself/herself.

      • isBanned: boolean

        Whether the player has been banned or not. If reason is null, this value is ignored.

      • byId: number

        Id of the player who has kicked/banned the player. If reason is null, this value is ignored.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns void

      void.

    • Called just after a player object has been created. This callback can be used to define custom properties inside all player objects.

      Parameters

      • playerObj: Player

        The new Player object that has just been created.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns void

      void.

    • Called just after a player's synchronization status has changed.

      Parameters

      • playerId: number

        Id of the player whose synchronization status has changed.

      • value: boolean

        The new synchronization status.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns void

      void.

    • Called just after a player has been moved to a different team.

      Parameters

      • id: number

        Id of the player who has been moved to a different team.

      • teamId: number

        Id of the player's new team.

      • byId: number

        Id of the player who has triggered this event.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns void

      void.

    • Called just after the score limit has been changed.

      Parameters

      • value: number

        The new score limit value.

      • byId: number

        Id of the player who has triggered this event.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns void

      void.

    • Called just after the room's current stadium has been changed.

      Parameters

      • stadium: IStadium

        The room's new Stadium object.

      • byId: number

        Id of the player who has triggered this event.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns void

      void.

    • Called just after a team's colors have been changed.

      Parameters

      • teamId: number

        The team whose colors have been changed.

      • value: TeamColors

        The new team colors value.

      • byId: number

        Id of the player who has changed the team colors.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns void

      void.

    • Called just after the room's teams have been locked/unlocked.

      Parameters

      • value: boolean

        The room's new teams lock value.

      • byId: number

        Id of the player who has triggered this event.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns void

      void.

    • Called just after the time limit has been changed.

      Parameters

      • value: number

        The new time limit value.

      • byId: number

        Id of the player who has triggered this event.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns void

      void.

    • Called just after an "auto" event has been triggered to automatically move at least one, at most two players from spectators to teams.

      Parameters

      • playerId1: number

        Id of the first player affected by this event.

      • teamId1: number

        Id of the team which the first player was moved into.

      • playerId2: number | null

        Id of the second player affected by this event, or null if there was only one spectator when this event was triggered.

      • teamId2: number | null

        Id of the team which the second player was moved into, or null if there was only one spectator when this event was triggered.

      • byId: number

        Id of the player who has triggered the event.

      Returns any

      void or a custom data to pass to the next callback.

    • Called just after the game has been paused or resumed.

      Parameters

      • isPaused: boolean

        Whether the game has been paused or not.

      • byId: number

        Id of the player who has triggered this event.

      Returns any

      void or a custom data to pass to the next callback.

    • Called just after the game has been started.

      Parameters

      • byId: number

        Id of the player who has started the game.

      Returns any

      void or a custom data to pass to the next callback.

    • Called just after the game has been stopped.

      Parameters

      • byId: number

        Id of the player who has stopped the game.

      Returns any

      void or a custom data to pass to the next callback.

    • Called just after the room's kick rate limit has been changed.

      Parameters

      • min: number

        The new min part of kick rate limit.

      • rate: number

        The new rate part of kick rate limit.

      • burst: number

        The new burst part of kick rate limit.

      • byId: number

        Id of the player who has changed the kick rate limit.

      Returns any

      void or a custom data to pass to the next callback.

    • Called just after room's overtime limit has been changed.

      Parameters

      • value: number

        The desired overtime limit of the game.

      Returns any

      void or a custom data to pass to the next callback.

    • Called just after a player's admin rights have been given/taken.

      Parameters

      • id: number

        Id of the player whose admin rights have been given/taken.

      • isAdmin: boolean

        The new admin rights status of the player whose id is id.

      • byId: number

        Id of the player who has triggered this event.

      Returns any

      void or a custom data to pass to the next callback.

    • Called just after a player has changed his/her avatar.

      Parameters

      • id: number

        Id of the player who has changed his/her avatar.

      • value: string

        The new avatar value.

      Returns any

      void or a custom data to pass to the next callback.

    • Called just after a chat message has been received.

      Parameters

      • id: number

        Id of the player who has sent the chat message.

      • message: string

        The chat message.

      Returns any

      void or a custom data to pass to the next callback.

    • Called just after a player has activated or deactivated his/her chat indicator. This happens when a player focuses/loses focus on the chat input component in the website.

      Parameters

      • id: number

        Id of the player whose chat indicator has been activated/deactivated.

      • value: boolean

        Whether the chat indicator has been activated or not.

      Returns any

      void or a custom data to pass to the next callback.

    • Called just after the direction of an individual player was changed. room.state.directionActive must be true for this to work.

      Parameters

      • id: number

        Id of the player whose energy values will be modified.

      • value: number

        New direction value of the player.

      Returns any

      void or a custom data to pass to the next callback.

    • Called just after a disc object has been assigned to a player object.

      Parameters

      • playerObj: Player

        The new Player object that has just been assigned a disc object.

      Returns any

      void or a custom data to pass to the next callback.

    • Called just after a disc object has been removed from a player object.

      Parameters

      • playerObj: Player

        The Player object whose disc object has just been removed.

      Returns any

      void or a custom data to pass to the next callback.

    • Called just after a player's input has been changed.

      Parameters

      • id: number

        Id of the player whose input has been changed.

      • value: number

        The new input value of the player.

      Returns any

      void or a custom data to pass to the next callback.

    • Called just after a player has joined the room.

      Parameters

      • playerObj: Player

        The data representation of the player that has just joined the room.

      Returns any

      void or a custom data to pass to the next callback.

    • Called just after a player has left the room.

      Parameters

      • playerObj: Player

        The player who has left the room.

      • reason: string | null

        The reason of leaving the room. If null, the player has left by himself/herself.

      • isBanned: boolean

        Whether the player has been banned or not. If reason is null, this value is ignored.

      • byId: number

        Id of the player who has kicked/banned the player. If reason is null, this value is ignored.

      Returns any

      void or a custom data to pass to the next callback.

    • Called just after a player object has been created. This callback can be used to define custom properties inside all player objects.

      Parameters

      • playerObj: Player

        The new Player object that has just been created.

      Returns any

      void or a custom data to pass to the next callback.

    • Called just after a player's synchronization status has changed.

      Parameters

      • playerId: number

        Id of the player whose synchronization status has changed.

      • value: boolean

        The new synchronization status.

      Returns any

      void or a custom data to pass to the next callback.

    • Called just after a player has been moved to a different team.

      Parameters

      • id: number

        Id of the player who has been moved to a different team.

      • teamId: number

        Id of the player's new team.

      • byId: number

        Id of the player who has triggered this event.

      Returns any

      void or a custom data to pass to the next callback.

    • Called just after the score limit has been changed.

      Parameters

      • value: number

        The new score limit value.

      • byId: number

        Id of the player who has triggered this event.

      Returns any

      void or a custom data to pass to the next callback.

    • Called just after the room's current stadium has been changed.

      Parameters

      • stadium: IStadium

        The room's new Stadium object.

      • byId: number

        Id of the player who has triggered this event.

      Returns any

      void or a custom data to pass to the next callback.

    • Called just after a team's colors have been changed.

      Parameters

      • teamId: number

        The team whose colors have been changed.

      • value: TeamColors

        The new team colors value.

      • byId: number

        Id of the player who has changed the team colors.

      Returns any

      void or a custom data to pass to the next callback.

    • Called just after the room's teams have been locked/unlocked.

      Parameters

      • value: boolean

        The room's new teams lock value.

      • byId: number

        Id of the player who has triggered this event.

      Returns any

      void or a custom data to pass to the next callback.

    • Called just after the time limit has been changed.

      Parameters

      • value: number

        The new time limit value.

      • byId: number

        Id of the player who has triggered this event.

      Returns any

      void or a custom data to pass to the next callback.