fCraft.PlayerOpException.CheckKickReason C# (CSharp) Method

CheckKickReason() static private method

static private CheckKickReason ( [ reason, [ player, PlayerInfo targetInfo ) : void
reason [
player [
targetInfo PlayerInfo
return void
        internal static void CheckKickReason( [CanBeNull] string reason, [NotNull] Player player, PlayerInfo targetInfo )
        {
            if ( player == null )
                throw new ArgumentNullException( "player" );
            if ( ConfigKey.RequireKickReason.Enabled() && String.IsNullOrEmpty( reason ) ) {
                const string msg = "Please specify a kick reason.";
                const string colorMsg = "&S" + msg;
                throw new PlayerOpException( player, targetInfo, PlayerOpExceptionCode.ReasonRequired, msg, colorMsg );
            }
        }