/// <summary> /// Fires the <see cref="PlayerProjbanPermission"/> event. /// </summary> /// <param name="player">The player firing the event.</param> /// <returns>Event result if the event has been handled, otherwise <see cref="PermissionHookResult.Unhandled"/>.</returns> public static PermissionHookResult OnPlayerProjbanPermission(TSPlayer player, ProjectileBan bannedProj) { if (PlayerProjbanPermission == null) { return(PermissionHookResult.Unhandled); } var args = new PlayerProjbanPermissionEventArgs(player, bannedProj); PlayerProjbanPermission(args); return(args.Result); }
/// <summary> /// Initializes a new instance of the PlayerProjbanPermissionEventArgs class. /// </summary> /// <param name="player">The player who fired the event.</param> /// <param name="checkedProjectile">The banned projectile being checked.</param> public PlayerProjbanPermissionEventArgs(TSPlayer player, ProjectileBan checkedProjectile) { Player = player; BannedProjectile = checkedProjectile; Result = PermissionHookResult.Unhandled; }