Interfaces
IEventService
Provides utility methods to trigger events on the client.
Methods
TriggerEventWithoutCallback
Triggers an event for the specified player or if null selects a random player on the server.
Parameters
| Name | Type | Description |
|---|---|---|
| player | Player | The player to trigger the event for. |
| eventName | string | The event name. |
| args | params object[] | The arguments of the event. |
TriggerEvent
Triggers an event for the specified player or if null selects a random player on the server.
Parameters
| Name | Type | Description |
|---|---|---|
| player | Player | The player to trigger the event for. |
| eventName | string | The event name. |
| callback | Action<string> | A callback function which is invoked when the event returns. |
| args | params object[] | The arguments of the event. |
TriggerEventAsync
Triggers an event for the specified player or if null selects a random player on the server. Same as the normal
Parameters
| Name | Type | Description |
|---|---|---|
| player | Player | The player to trigger the event for. |
| eventName | string | The event name. |
| args | params object[] | The arguments of the event. |
Returns
| Name | Type |
|---|---|
| Task<string> | A |
TriggerEventStrictWithoutCallback
Triggers an event for the specified player.
Parameters
| Name | Type | Description |
|---|---|---|
| player | Player | The player to trigger the event for. |
| eventName | string | The event name. |
| args | params object[] | The arguments of the event. |
TriggerEventStrict
Triggers an event for the specified player.
Parameters
| Name | Type | Description |
|---|---|---|
| player | Player | The player to trigger the event for. |
| eventName | string | The event name. |
| callback | Action<string> | A callback function which is invoked when the event returns. |
| args | params object[] | The arguments of the event. |
TriggerEventStrictAsync
Triggers an event for the specified player. Same as the normal
Parameters
| Name | Type | Description |
|---|---|---|
| player | Player | The player to trigger the event for. |
| eventName | string | The event name. |
| args | params object[] | The arguments of the event. |
Returns
| Name | Type |
|---|---|
| Task<string> | A |