public GodManager(NewEssentials plugin, IEventBus eventBus) { m_Gods = new HashSet <ulong>(); m_EventListenerDamaging = eventBus.Subscribe <UnturnedPlayerDamagingEvent>(plugin, OnPlayerDamaging); Patches.OnStatUpdating += Patches_OnStatUpdating; }
public AfkChecker(IEventBus eventBus, NewEssentials plugin, IConfiguration configuration, IStringLocalizer stringLocalizer, IUnturnedUserDirectory unturnedUserDirectory, IPermissionChecker permissionChecker) { m_EventBus = eventBus; m_Configuration = configuration; m_StringLocalizer = stringLocalizer; m_UnturnedUserDirectory = unturnedUserDirectory; m_PermissionChecker = permissionChecker; m_ServiceRunning = true; m_EventListener = m_EventBus.Subscribe <UnturnedUserConnectedEvent>(plugin, OnPlayerJoin); UniTask.RunOnThreadPool(CheckAfkPlayers); }