/// <summary>
 /// Initializes a new instance of the <see cref="CustomConsoleExecutor"/> class.
 /// </summary>
 /// <param name="client">Network Client.</param>
 /// <param name="cmd">Command.</param>
 public CustomConsoleExecutor(NPClient client, string cmd, string[] args, string addon)
 {
     this.client  = client;
     this.command = cmd;
     this.addonid = addon;
     this.args    = args;
 }
Exemple #2
0
        /// <inheritdoc/>
        public override void OnEnabled()
        {
            harmony = new Harmony($"networkedplugins.{DateTime.Now.Ticks}");
            harmony.PatchAll();

            Singleton = this;
            client    = new NPClient(this);
            base.OnEnabled();
        }
 public EventHandlers(NPClient client)
 {
     this.Client = client;
     Exiled.Events.Handlers.Server.LocalReporting    += Server_LocalReporting;
     Exiled.Events.Handlers.Player.Verified          += Player_Verified;
     Exiled.Events.Handlers.Player.Destroying        += Player_Destroying;
     Exiled.Events.Handlers.Server.WaitingForPlayers += Server_WaitingForPlayers;
     Exiled.Events.Handlers.Player.PreAuthenticating += Player_PreAuthenticating;
     Exiled.Events.Handlers.Server.RoundEnded        += Server_RoundEnded;
 }
Exemple #4
0
        /// <inheritdoc/>
        public override void OnDisabled()
        {
            harmony.UnpatchAll(harmony.Id);
            harmony = null;

            Singleton = null;
            if (client != null)
            {
                client.Unload();
                client = null;
            }

            base.OnDisabled();
        }