IGameEventService
Interfacepublic interface IGameEventServicePlugin-scoped service for managing game events.
View sourceMethods
Fires an event to all players. Thread unsafe, use async variant instead for non-main thread context.
[ThreadUnsafe]
void Fire<T>() where T : IGameEvent<T>Fires an event to all players with a configured event. Thread unsafe, use async variant instead for non-main thread context. The action to configure the event.
[ThreadUnsafe]
void Fire<T>(Action<T> configureEvent) where T : IGameEvent<T>- configureEventAction<T>
Fires an event to all players asynchronously.
Task FireAsync<T>() where T : IGameEvent<T>Fires an event to all players with a configured event asynchronously.
Task FireAsync<T>(Action<T> configureEvent) where T : IGameEvent<T>- configureEventAction<T>
Fires an event to a player. Thread unsafe, use async variant instead for non-main thread context.
[ThreadUnsafe]
void FireToPlayer<T>(int slot) where T : IGameEvent<T>- slotintThe player slot.
Fires an event to a player with a configured event. Thread unsafe, use async variant instead for non-main thread context.
[ThreadUnsafe]
void FireToPlayer<T>(int slot, Action<T> configureEvent) where T : IGameEvent<T>Fires an event to a player asynchronously.
Task FireToPlayerAsync<T>(int slot) where T : IGameEvent<T>- slotintThe player slot.
Fires an event to a player with a configured event asynchronously.
Task FireToPlayerAsync<T>(int slot, Action<T> configureEvent) where T : IGameEvent<T>Fires an event to the server. Thread unsafe, use async variant instead for non-main thread context.
[ThreadUnsafe]
void FireToServer<T>() where T : IGameEvent<T>Fires an event to the server with a configured event. Thread unsafe, use async variant instead for non-main thread context.
[ThreadUnsafe]
void FireToServer<T>(Action<T> configureEvent) where T : IGameEvent<T>- configureEventAction<T>The action to configure the event.
Fires an event to the server asynchronously.
Task FireToServerAsync<T>() where T : IGameEvent<T>Fires an event to the server with a configured event asynchronously.
Task FireToServerAsync<T>(Action<T> configureEvent) where T : IGameEvent<T>- configureEventAction<T>The action to configure the event.
Hooks a post-event callback.
Guid HookPost<T>(IGameEventService.GameEventHandler<T> callback) where T : IGameEvent<T>- callbackIGameEventService.GameEventHandler<T>The callback to hook.
Hooks a pre-event callback.
Guid HookPre<T>(IGameEventService.GameEventHandler<T> callback) where T : IGameEvent<T>- callbackIGameEventService.GameEventHandler<T>The callback to hook.
Check if the player is Listening this event.
bool IsListeningToEvent(int slot, string eventName)Check if the player is Listening this event.
bool IsListeningToEvent<T>(int slot) where T : IGameEvent<T>- slotintThe player slot.