fCraft.PlayerOpException.ThrowPlayerAlreadyBanned C# (CSharp) Method

ThrowPlayerAlreadyBanned() static private method

static private ThrowPlayerAlreadyBanned ( [ player, [ target, [ action ) : void
player [
target [
action [
return void
        internal static void ThrowPlayerAlreadyBanned( [NotNull] Player player, [NotNull] PlayerInfo target, [NotNull] string action )
        {
            if ( player == null )
                throw new ArgumentNullException( "player" );
            if ( target == null )
                throw new ArgumentNullException( "target" );
            if ( action == null )
                throw new ArgumentNullException( "action" );
            string msg = String.Format( "Player {0} is already {1}.", target.Name, action );
            string msgColored = String.Format( "&SPlayer {0}&S is already {1}.", target.ClassyName, action );
            throw new PlayerOpException( player, target, PlayerOpExceptionCode.NoActionNeeded, msg, msgColored );
        }