EventArgs used for the PlayerHooks.PlayerLogout event.
Beispiel #1
0
        /// <summary>
        /// Fires the <see cref="PlayerLogout"/> event.
        /// </summary>
        /// <param name="ply">The player firing the event.</param>
        public static void OnPlayerLogout(TSPlayer ply)
        {
            if (PlayerLogout == null)
            {
                return;
            }

            var args = new PlayerLogoutEventArgs(ply);

            PlayerLogout(args);
        }
Beispiel #2
0
		void OnLogout(PlayerLogoutEventArgs e)
		{
			if (e.Player.ContainsData(Contributor.DataKey))
			{
				// Remove the stored contributor object and stop listening to events
				// Note: TSPlayer.RemoveData(string) returns the removed object
				((Contributor)e.Player.RemoveData(Contributor.DataKey)).Unlisten();
			}
		}
Beispiel #3
0
        public static void OnPlayerLogout(TSPlayer ply)
        {
            if (PlayerLogout == null)
                return;

            var args = new PlayerLogoutEventArgs(ply);
            PlayerLogout(args);
        }
Beispiel #4
0
 public void OnLogout(PlayerLogoutEventArgs args)
 {
     if (args.Player != null && args.Player.User != null)
     {
         if (args.Player.Group.HasPermission("aio.checkgrief"))
         {
             File.AppendAllText(Utils.GetPath(), $"{DateTime.Now.ToString("g")} :: {args.Player.User.Name} has logged out.\r\n");
         }
     }
 }