示例#1
0
        protected override void Load()
        {
            Instance = this;
            U.Events.OnPlayerDisconnected += Events_OnPlayerDisconnected;
            U.Events.OnPlayerConnected    += Events_OnPlayerConnected;

            #region WriteLoad
            if (Configuration.Instance.IgnoreAdmin)
            {
                Write("Ignore Admin: Enabled", ConsoleColor.Green);
            }
            else
            {
                Write("Ignore Admin: Disabled", ConsoleColor.Red);
            }
            if (Configuration.Instance.PvPOnOffMessage)
            {
                Write("PvP on|off Message: Enabled", ConsoleColor.Green);
            }
            else
            {
                Write("PvP on|off Message: Disabled", ConsoleColor.Red);
            }

            if (Configuration.Instance.PvPOnOffPermission)
            {
                Write("PvP on|off permission: Enabled", ConsoleColor.Green);
                Write($"Permission: {Configuration.Instance.Permission}", ConsoleColor.DarkGreen);
            }
            else
            {
                Write("PvP on|off permission: Disabled", ConsoleColor.Red);
            }
            #endregion
        }
示例#2
0
 protected override void Unload()
 {
     Instance = null;
     U.Events.OnPlayerDisconnected -= Events_OnPlayerDisconnected;
     U.Events.OnPlayerConnected    -= Events_OnPlayerConnected;
 }