mooball
    Preparing search index...

    Interface IndividuallyTriggeredCallbacks

    interface IndividuallyTriggeredCallbacks {
        onPlayerBallKick?(playerId: number, customData?: any): any;
        onTeamGoal?(
            teamId: number,
            goalId: number,
            goal: Goal,
            ballDiscId: number,
            ballDisc: Disc,
            customData?: any,
        ): any;
        onGameEnd?(winningTeamId: number, customData?: any): any;
        onGameTick?(customData?: any): any;
        onKickOff?(customData?: any): any;
        onTimeIsUp?(customData?: any): any;
        onPositionsReset?(customData?: any): any;
        onCollisionDiscVsDisc?(
            discId1: number,
            discPlayerId1: number,
            discId2: number,
            discPlayerId2: number,
            customData?: any,
        ): any;
        onCollisionDiscVsSegment?(
            discId: number,
            discPlayerId: number,
            segmentId: number,
            customData?: any,
        ): any;
        onCollisionDiscVsPlane?(
            discId: number,
            discPlayerId: number,
            planeId: number,
            customData?: any,
        ): any;
        onHandicapChange?(value: number, customData?: any): any;
        onRoomRecordingChange?(value: true | ArrayBuffer, customData?: any): any;
        onPluginActiveChange?(plugin: Plugin, customData?: any): any;
        onConfigUpdate?(
            oldRoomConfigObj: RoomConfig,
            newRoomConfigObj: RoomConfig,
            customData?: any,
        ): any;
        onRendererUpdate?(
            oldRendererObj: Renderer,
            newRendererObj: Renderer,
            customData?: any,
        ): any;
        onPluginAdd?(pluginObj: Plugin, customData?: any): any;
        onPluginMove?(pluginObj: Plugin, customData?: any): any;
        onPluginUpdate?(
            oldPluginObj: Plugin,
            newPluginObj: Plugin,
            customData?: any,
        ): any;
        onPluginRemove?(pluginObj: Plugin, customData?: any): any;
        onLibraryAdd?(libraryObj: Library, customData?: any): any;
        onLibraryMove?(libraryObj: Library, customData?: any): any;
        onLibraryUpdate?(
            oldLibraryObj: Library,
            newLibraryObj: Library,
            customData?: any,
        ): any;
        onLibraryRemove?(libraryObj: Library, customData?: any): any;
        onLanguageChange?(abbr: string, customData?: any): any;
        onVariableValueChange?(
            addonObject: Addon,
            variableName: string,
            oldValue: any,
            newValue: any,
            customData?: any,
        ): any;
    }

    Hierarchy (View Summary)

    • Called just after the ball has been kicked.

      Parameters

      • playerId: number

        Id of the player who kicked the ball.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns any

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

    • Called just after a goal has been scored.

      Parameters

      • teamId: number

        Id of the team that scored the goal.

      • goalId: number

        Id of the goal object that the ball went in.

      • goal: Goal

        The goal object that the ball went in.

      • ballDiscId: number

        Id of the ball disc that caused the goal.

      • ballDisc: Disc

        The ball disc that caused the goal.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns any

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

    • Called just after the game has ended.

      Parameters

      • winningTeamId: number

        Id of the team that won the game.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns any

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

    • Called just after a game tick has occurred. This will run a lot of times per second. Be careful not to make too many calculations here, otherwise the game might slow down.

      Parameters

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns any

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

    • Called just after a kick-off event has occurred.

      Parameters

      • OptionalcustomData: any

      Returns any

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

    • Called just after the game has ended by timeout.

      Parameters

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns any

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

    • Called just after the player positions have been reset. This event happens just after a new game has been started or a goal has been scored. The player positions are reset to their corresponding spawn points defined in the current room's Stadium object.

      Parameters

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns any

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

    • Called just after a collision has happened between two discs.

      Parameters

      • discId1: number

        Id of the first collided disc.

      • discPlayerId1: number

        The player's id that the first disc belongs to. If the disc is not a player's disc, this value will be null.

      • discId2: number

        Id of the second collided disc.

      • discPlayerId2: number

        The player's id that the second disc belongs to. If the disc is not a player's disc, this value will be null.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns any

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

    • Called just after a collision has happened between a disc and a segment.

      Parameters

      • discId: number

        Id of the collided disc.

      • discPlayerId: number

        The player's id that the disc belongs to. If the disc is not a player's disc, this value will be null.

      • segmentId: number

        Id of the collided segment.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns any

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

    • Called just after a collision has happened between a disc and a plane.

      Parameters

      • discId: number

        Id of the collided disc.

      • discPlayerId: number

        The player's id that the disc belongs to. If the disc is not a player's disc, this value will be null.

      • planeId: number

        Id of the collided plane.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns any

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

    • Called just after the local ping handicap value has been changed.

      Parameters

      • value: number

        The new ping handicap value in milliseconds. Range: 0 <= value <= 300.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns any

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

    • Called just after room recording has been started or stopped.

      Parameters

      • value: true | ArrayBuffer

        If true, recording has just been started,

        • Else, the recording has just stopped and the recorded data is returned in value as an ArrayBuffer. You might want to write the contents to a version-3 replay file.
      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns any

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

    • Called just after a plugin has been activated or deactivated.

      Parameters

      • plugin: Plugin

        The plugin which was activated or deactivated. This property stores the current activation status of the plugin: plugin.active.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns any

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

    • Called just after the room's config object has been replaced by a new one.

      Parameters

      • oldRoomConfigObj: RoomConfig

        The old RoomConfig object.

      • newRoomConfigObj: RoomConfig

        The new RoomConfig object.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns any

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

    • Called just after the room's renderer object has been replaced by a new one.

      Parameters

      • oldRendererObj: Renderer

        The old Renderer object.

      • newRendererObj: Renderer

        The new Renderer object.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns any

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

    • Called just after a plugin object has been added.

      Parameters

      • pluginObj: Plugin

        The Plugin object.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns any

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

    • Called just after a plugin object has been moved.

      Parameters

      • pluginObj: Plugin

        The Plugin object.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns any

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

    • Called just after an old plugin object has been replaced by a new one.

      Parameters

      • oldPluginObj: Plugin

        The old Plugin object.

      • newPluginObj: Plugin

        The new Plugin object.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns any

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

    • Called just after a plugin object has been removed.

      Parameters

      • pluginObj: Plugin

        The Plugin object.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns any

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

    • Called just after a library object has been added.

      Parameters

      • libraryObj: Library

        The Library object.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns any

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

    • Called just after a library object has been moved.

      Parameters

      • libraryObj: Library

        The Library object.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns any

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

    • Called just after an old library object has been replaced by a new one.

      Parameters

      • oldLibraryObj: Library

        The old Library object.

      • newLibraryObj: Library

        The new Library object.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns any

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

    • Called just after a library object has been removed.

      Parameters

      • libraryObj: Library

        The Library object.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns any

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

    • Called just after the API's language has been changed.

      Parameters

      • abbr: string

        The new language's abbreviation value.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns any

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

    • Called just after the value of a variable has been changed.

      Parameters

      • addonObject: Addon

        The Addon object that the variable belongs to.

      • variableName: string

        The name of the variable whose value has been changeed.

      • oldValue: any

        The old value of the variable.

      • newValue: any

        The new value of the variable.

      • OptionalcustomData: any

        the custom data that was returned from the previous callback.

      Returns any

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