Esempio n. 1
0
        public GodManager(NewEssentials plugin, IEventBus eventBus)
        {
            m_Gods = new HashSet <ulong>();

            m_EventListenerDamaging = eventBus.Subscribe <UnturnedPlayerDamagingEvent>(plugin, OnPlayerDamaging);
            Patches.OnStatUpdating += Patches_OnStatUpdating;
        }
Esempio n. 2
0
        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);
        }